Moving the looked-up fields that are under lookupResult directly in JSON

As we have seen, lookupResult is an array with just one element: the element at index 0 in the array. We need to move all the fields under this array element directly under the JSON payload. This is done field by field using the rename operation.

For example, the following operation renames the existing sensorType field directly under the JSON payload:

rename => {"[lookupResult][0][sensorType]" => "sensorType"}

We do this for all the looked-up fields that are returned by the SQL query.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.198.60