parseJSON question

Hi Everyone,

I wonder could anyone assist please: I am trying to parse this chunk of JSON in a calc field and am getting Syntax Errors:

[{“content” : “19”, “chosen” : true, “is_correct” : true},
{“content” : “18”, “chosen” : false, “is_correct” : false},
{“content” : “20”, “chosen” : false, “is_correct” : false},
{“content” : “15”, “chosen” : false, “is_correct” : false}]

The above is in a field called ‘answers’ (String field from direct query to postgres)

I’ve tried several ways including:
parseJson(answers,“[$][0][content]”)
parseJson(answers,“$[0][content]”)
parseJson(answers,“$.content”)

But no joy…any advice would be greatly appreciated!

Thank you
R

Have you tried parseJson({answers}, “$.0.content”)?

Hi, @rkingston. We hope Max’s solution worked for you. Let us know if this is resolved. (And if it is, we’d love it if you could mark his answer as a “Solution.”) Thanks!

Hi All,

thank you for your comment! Unfortunately that also results in a syntax error.
Since then, I think we have managed to answer the question ourselves - it looks like parsing of JSON list items are simply not supported by the parseJSON function:

As a result, we have gone back to the drawing board to remove the usage of JSON data and just deliver more rows instead.

Thanks again all!
R

I tried this one, it did now work using athena. Any suggestion?