-
Notifications
You must be signed in to change notification settings - Fork 332
JSON.GET: unable to correlate field name with value when using with multiple fields #1307
New issue
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
Comments
Let us start with the following JSON:
You can either retrieve all the details of each person:
or specific fields' values - but then you'll get just an array without being able to correlate a value with a field:
or without being able to correlate a field with a person:
For expressions such as We're aware of this issue. Similar issues:
There is no way for us to fix it without introducing breaking changes to the structure of our results. One strategy that may help with your use case (or may not) is to break the query into several queries. For example: First, we'll retrieve the first and last name of any person who has both first and last name:
Next, we'll retrieve the first name of any person who has a first name but no last name:
Finally, we'll retrieve the last name of any person who has a last name but no first name:
You can of course combine it into a single query as well:
|
Thanks for yor reply! Very appreciated.
and I have some concern about performance due to penalty executing the same |
Sorry, I don't have any suggestions. We have a plan to revise the way we reply.
After the change, the RESP3 reply would be:
Here is another example:
After the suggested change, the reply would be:
This is a large and breaking change. It is part of an even larger effort to solve some problems with the current API. Unfortunately, I cannot share any timeline. |
Giving a json with this schema:
and this json data
command
JSON.GET key '$.["firstName","lastName","age"]'
return["first",37]
but no indication about missing value; this is particular annoying because it's not possible to match returned values list with the associated fields.Is there any way to solve (or workaround) the problem?
The text was updated successfully, but these errors were encountered: