sql server - Query JSON data with unknown number of entries -


we're using sql server 2016 import , analyze data json files. picture below displays sample of data we're working with. notice how resources[0].routelegs[0].itineraryitems[0] doesn't have "warnings" attribute yet resources[0].routelegs[0].itineraryitems[15] (highlighted in yellow).

we're trying find way query of resources[0].routelegs[0].itineraryitems (no matter how many available) see if of them have "warnings" attribute. way know how hard code json_value query (please see second image below). there way query of resources[0].routelegs[0].itineraryitems @ once see if of them have "warnings" attribute?

sample json

sample sql


Comments

Popular posts from this blog

php - Embed BBCode within itself not working -

three.js - how to load gltf in three JS -

sql server - T-SQL: Access DB objects in same schema without qualifying? -