goofballLogic / ld-query

Querying JSON-LD
MIT License
20 stars 6 forks source link

Querying for a @value of 0 returns a null #20

Closed goofballLogic closed 7 years ago

goofballLogic commented 7 years ago

if I query a document

[ {
   "http://example.org#name" : [ { "@value" : "Gwyneth" } ],
   "http://example.org#age" : [ { "@value" : 0 } ]
} ]

using

const age = doc.query( "ex:age @value" );

it returns a null, when I expect a 0