rest.li
rest.li copied to clipboard
How will the projectFields behave if a field being masked not appear in result
For example, if our mask is:
{
a:1,
b:1
}
while the result is:
{
{
a:'apple'
},
{
a:'apple1'
b:'bee'
}
}
After field projection, will the first record
{
a:'apple'
}
be removed so that only the second record is left? Or the first record would not change? Thank you.
No, projectFields does not remove records. It just filters out the fields that are not in the projection mask.
With the mask of a:1,b:1 the 'c' element would be removed from the response below:
{
{
a:'apple'
},
{
a:'apple1',
b:'bee',
c:'lemon'
}
}