Hythens in variables #4260
Hythens in variables
#4260
-
hai! I have this data to parse, that im fetching from a URL. let json.parse ({
subsonic-response
} : {
subsonic-repsonse: {
status: string
version: string
}
})
print("blah: #{subsonic-response}") and im not sure how to handle it when there is a hythen in the object key INFO: Loading Sdl_image, Target = linux
At script.liq, line 30, char 16:
subsonic-response
Error 2: Parse error How can i access/use |
Beta Was this translation helpful? Give feedback.
Answered by
toots
Dec 12, 2024
Replies: 1 comment 1 reply
-
Hi! For JSON keys that are not representable as variables, you have the
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
sammypanda
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! For JSON keys that are not representable as variables, you have the
"weird name" as weird_name
syntax as documented at https://www.liquidsoap.info/doc-2.3.0/json.html#objects: