Hi all,
I have a PostgreSQL table delivered by a vendor with a field in the JSON data field type.
When I query it in cfml, I get the following in Lucee:
and this in ACF:
but when running the query in DBeaver, it returns the following text string:
"{\"neutral_comments\":\"\\\"\\\"\",\"answers\":\"[{\\\"id\\\":3795,\\\"text\\\":\\\"Arthur Frank\\\",\\\"html\\\":\\\"\\\",\\\"comments\\\":\\\"\\\",\\\"comments_html\\\":\\\"\\\",\\\"weight\\\":100.0},{\\\"id\\\":870,\\\"text\\\":\\\"Anne Frank\\\",\\\"html\\\":\\\"\\\",\\\"comments\\\":\\\"\\\",\\\"comments_html\\\":\\\"\\\",\\\"weight\\\":0.0},{\\\"id\\\":211,\\\"text\\\":\\\"Lucy Grealy\\\",\\\"html\\\":\\\"\\\",\\\"comments\\\":\\\"\\\",\\\"comments_html\\\":\\\"\\\",\\\"weight\\\":0.0},{\\\"id\\\":7607,\\\"text\\\":\\\"Arthur Kleinman\\\",\\\"html\\\":\\\"\\\",\\\"comments\\\":\\\"\\\",\\\"comments_html\\\":\\\"\\\",\\\"weight\\\":0.0},{\\\"id\\\":8013,\\\"text\\\":\\\"Anne Hawkins\\\",\\\"html\\\":\\\"\\\",\\\"comments\\\":\\\"\\\",\\\"comments_html\\\":\\\"\\\",\\\"weight\\\":0.0}]\",\"name\":\"\\\"Question\\\"\",\"question_type\":\"\\\"multiple_choice_question\\\"\",\"question_text\":\"\\\"<p><strong>Who developed the three different categories of \\\\\\\"Narratives of Illness\\\\\\\"?</strong></p>\\\"\",\"correct_comments\":\"\\\"\\\"\",\"incorrect_comments\":\"\\\"\\\"\",\"text_after_answers\":\"\\\"\\\"\",\"points_possible\":1.0}"
What’s the proper way to query and parse this data in cfml?
Thanks!