Page 1 of 1

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

Posted: Mon Oct 14, 2013 2:11 am
by bahar.wadia

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


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

Posted: Mon Oct 14, 2013 2:53 am
by maxkatz

What REST service/database are you using?


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

Posted: Mon Oct 14, 2013 3:04 am
by bahar.wadia

Appery


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

Posted: Mon Oct 14, 2013 3:28 am
by maxkatz

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


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

Posted: Mon Oct 14, 2013 4:17 am
by bahar.wadia

Any work arounds ?


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

Posted: Mon Oct 14, 2013 8:58 am
by Kateryna Grynko

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