dynamic-queries

Is there a query language for JSON?

你。 提交于 2019-11-26 05:41:16
Is there a (roughly) SQL or XQuery-like language for querying JSON? I'm thinking of very small datasets that map nicely to JSON where it would be nice to easily answer queries such as "what are all the values of X where Y > 3" or to do the usual SUM / COUNT type operations. As completely made-up example, something like this: [{"x": 2, "y": 0}}, {"x": 3, "y": 1}, {"x": 4, "y": 1}] SUM(X) WHERE Y > 0 (would equate to 7) LIST(X) WHERE Y > 0 (would equate to [3,4]) I'm thinking this would work both client-side and server-side with results being converted to the appropriate language-specific data

Is there a query language for JSON?

浪子不回头ぞ 提交于 2019-11-26 01:55:48
问题 Is there a (roughly) SQL or XQuery-like language for querying JSON? I\'m thinking of very small datasets that map nicely to JSON where it would be nice to easily answer queries such as \"what are all the values of X where Y > 3\" or to do the usual SUM / COUNT type operations. As completely made-up example, something like this: [{\"x\": 2, \"y\": 0}}, {\"x\": 3, \"y\": 1}, {\"x\": 4, \"y\": 1}] SUM(X) WHERE Y > 0 (would equate to 7) LIST(X) WHERE Y > 0 (would equate to [3,4]) I\'m thinking