bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

How to construct a REST query to request a single element from a Array field in the database ?

I have a REST database with an Array type. The array contain numerous long strings. I want to be able to query the database, and for every record returned, I only to get the first element from the Array field.

Is there a way to do this ?

The purpose for this is to minimize data transfer and improve performance.

Please help. Thanks

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to construct a REST query to request a single element from a Array field in the database ?

What REST service/database are you using?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to construct a REST query to request a single element from a Array field in the database ?

We will be adding such feature, but not available yet.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to construct a REST query to request a single element from a Array field in the database ?

As a workaround you can add the following JS code in mapping:
codereturn value[0];/code

Return to “Issues”