06 Dec 2023 03:18 PM - edited 06 Dec 2023 03:32 PM
Hello, I am trying to parse two values from the content field, but ran into a problem with quotation marks.
Here's a shortened version of the record:
content:{"contextMap":{"id:"a1","details":["description":"amount","grossAmount":20,
My parse without double quotation marks looks like this and only results in a null return value:
| parse content, "LD 'description' WORD:description, LD 'grossAmount' INT:grossAmount"
If I change it to include the double quotes it breaks the query:
| parse content, "LD 'description":"' WORD:description, LD 'grossAmount":' INT:grossAmount"
How can I use double quotes without breaking the parse query?
Solved! Go to Solution.
06 Dec 2023 05:34 PM
Hi @eriknois
You can use triple quotes
data record(content="""content:{"contextMap":{"id:"a1","details":["description":"amount","grossAmount":20]""")
| parse content, """LD '"description":' DQS:amount ',"grossAmount":' INT:grossAmount"""
Best,
Sini
07 Dec 2023 08:07 AM
Great, thank you for the quick reply!