output of stringify function not compatible with query function
joelleortiz opened this issue · comments
Joelle Ortiz commented
When using stringify
, the path expression output is not directly compatible for use in the query
function to get data from objects.
stringify output: $.response.items["*"]["iso-1234"]
query input: $.response.items[*]['iso-1234']
stringify output: $.items["*"]["\"te\\st\""]
query input: $.items[*]['\"te\\st\"']
i suspect it's because of the JSON.stringify
step for string literals:
Line 179 in c1dd8ec
Are the two functions (stringify
and query
) meant to be used together in this way? Or is there any other way to generate a path expression from an array of element paths that can be directly used to query data later?
Becky Conning commented
Struggling with the same issue of [*]
becoming ["*"]
.