We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have been constructing a JSONata query and it involves multi-level json operation. Transforming and filtering. This is my 1st attempt.
{ "id": <path>.value, "source_id": <path>.value, "type": <path>.value, "inner_list": <path>.[filter!=null].{ "index": <path>.value, "text": <path>.value, "responses": <path>.{ "index": <path>.value "original_response": <path.value> } } }[$count(inner_list) != 0]
count(inner_list)
... ... }[$count(inner_list) != 0]{ "id": source_id ? id : null, "type": type in ["preamble_9", "preamble_10", "preamble_11"] ? "Default Preamble" : type, <how-to-preserve-all-the-other-keys-here> }
How to preserve/unpack the keys that are untouched?
Note: We will be generating jsonata programatically, so re-writing the whole object again isn't an option
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have been constructing a JSONata query and it involves multi-level json operation. Transforming and filtering. This is my 1st attempt.
Things I want to do
count(inner_list)
as a key/value in the objectHow to preserve/unpack the keys that are untouched?
The text was updated successfully, but these errors were encountered: