-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to extract values from nested json objects using JSON Extractor #24
Comments
Hi. Any updates regarding this bug? |
Hi, you can use the JsonTuple function to get the values, the code snippet to extract the properties 5,6 and 7 is done as follows @jsonnodes = @nodes_exploded = SELECT name, node_value The snippet above will give you an output as follows Please let me know if this helps and if you have any further questions. |
Thanks for the reply! What does @b1_property refer to here? |
Sorry Chad, updated to fix typo in code to call the right variable. |
I don't quite understand what jsonstring refers to here. Isn't the input coming from @JSON? Sorry for the sporadic questioning. I keep getting pulled onto other things :) |
jsonstring is the string you extracted out of the JSON using the JSONExtractor. I have also published code that parses Json on the github site - please do take a look at https://github.com/Azure/usql/blob/master/Examples/JsonSample/JsonSample/NestedJsonParsing.usql that will give the full script that starts with extracting content from a JSON file and manipulating the data. Please let me know if you have any questions. |
I'm able to extract nested objects now. Thanks for all your help! |
Excellent thanks Chad. |
Hi rukmanig, I've a nested json for which I've used JsonFunction.JsonTuple() in conjuction with EXPLODE() but that nested json have a sub-properties too. Could you please tell me how to read the sub-properties using JsonFunction.JsonTuple (), please ? Thanks |
I have a json file that contains a few properties, say,
Few of them are nested. How to extract the nested property values using JSON extractor. For example, I want to extract the values of properties 5,6,7.
The text was updated successfully, but these errors were encountered: