tastott / jsoql

A SQL-like language for querying JSON data
http://tastott.github.io/jsoql
3 stars 1 forks source link

Keyword to "promote" column as whole row value #99

Closed tastott closed 8 years ago

tastott commented 8 years ago

An example:

SELECT Name FROM 'file://people.json'

returns

{"Name": "Bob"}
{"Name": "Dave"}
{"Name": "Jim"}

If you want the rows to be the names themselves (i.e. strings), then you can PROMOTE one column only to be the whole row value:

SELECT PROMOTE Name FROM 'file://people.json'

returns

Bob
Dave
Jim