{
"rest" : {
"query: {
"lang" : "",
"map" : "",
"name" : "",
"age" : 2
}
}
}
Now if I just want 2 keys inside query, we can write a special restmap string
{rest{query{lang,map}}}
which will return only the required data
{
"rest" : {
"query: {
"lang" : "",
"map" : ""
}
}
}
{
"rest" : {
"query": {
"lang" : "",
"map" : "",
"name" : "",
"age" : 2,
"something" : {
"good": true,
"is" : true,
"here" : true
}
},
}
}
What if we need to remove just 1 or 2 keys and return all other keys.
Suppose I need all keys inside rest.query
except lang
& map
while also reducing rest.query.something
{rest{query{-lang,-map,something{good}}}}
-
marks the key as an escape key (you can also customize it; read more below)
which will return only the required data
{
"rest" : {
"query: {
"name" : "",
"age" : 2,
"something" : {
"good": true
}
},
}
}