Help with JSON.parse

Can anyone help me? i just cant figure this one out i’ve been stuck forever now. You have no idea how much i’d appreciate it!

The text you are trying to parse is not a valid JSON.
Also the .“Category” seems wrong, this should be (JSON.parse()). I guess

And welcome to the community!

I should give some context. So this is an input from Openai im using for classification. How can i parse Category, Group, and Keyword from “text”?

You will need to split the response into the JSON and the text after the JSON.
Depending on all possible text values. It is probably easiest to find the last index of “}” and then slice the text to get the JSON.

Do you mean to literally go in and edit the output? or is there a jmespath that does this easily?
when ive tried {{ JSON.parse($json.text) }} i received “undefined”

Please stick to one topic. :slight_smile:

1 Like

my apologies.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.