Formatting Data Outputs

How would I format my output data such that it looks like this:

[{label:'One', value:1}, {label:'Two', value:2}]

the string would column's value in a table and the integer would be a row id.

4 replies