How to do JSON parsing and subsequent type annotation within a nested array #4288
-
Happy Christmas 🎄, dear community! I am stuck getting specific fields within JSON data, as I cannot figure out how to access the contents of key-value pairs within a nested array. I would to access the data within Any kind of help would be most welcome. Many thanks in advance! Here is the JSON data : (liquidsoap code below JSON data)
Here is my current liquidsoap code that parses that JSON data - and quits with a parse error:
---------------------End of Original Post---------- |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
Hi @mojikosu, let json.parse (j:{
track: {
sections: [
{
tabname: string,
type: string,
metadata: [{
text: string,
title: string
}]?,
metapages: [{
caption: string,
image: string
}]?,
url: string?
}
]
}
}) The alternative is |
Beta Was this translation helpful? Give feedback.
-
@vitoyucepi Hi there and thank you for your input! Happy Boxing Day. 🎅
See the updated .liq file below:
|
Beta Was this translation helpful? Give feedback.
I'd like to replace
with