Assumes that a BaseX database product_feed
was created previously using the xquey:
db:create("product_feed")
-
XQuery Code
let $name := "/abc/shopclue-ProductFeed.json" let $file := file:read-text($name) let $json := json:parse($file) let $database :="product_feed" return db:add($database, $json, $name)
If the JSON key containing any space or special chars ar escaped; for example "Merchant Rating"
is converted to Merchant_0020Rating