How to return JSON array instead of text for specific column
See original GitHub issueI want to return a JSON array from an extractor like this:
`
10 : function(cellIndex , $cell){
var prlArray = [];
$cell.find('select option').each(function(){
//alert(this.value);
prlArray.push(this.value);
});
return JSON.parse(prlArray.toString());
}
`
This extractor is causing error in because of “return JSON.parse(prlArray.toString());” thanks in advance
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
PostgreSQL return result set as JSON array? - Stack Overflow
This section describes how to generate a JSON object, with each key being a column in the table and each value being an...
Read more >Solve common issues with JSON in SQL Server
Answer. If you want to return an object or an array as a column, use the AS JSON option in the column definition,...
Read more >The JSON_QUERY() function to extract objects from JSON Data
In this article, we will explore JSON_QUERY() functions in SQL Server to extract JSON objects and array from the JSON Data.
Read more >9.3: JSON Functions and Operators - PostgreSQL
Function Return Type Example Example Result
array_to_json(anyarray ) json array_to_json(''::int)
row_to_json(record ) json row_to_json(row(1,'foo'))
to_json(anyelement) json to_json('Fred said "Hi."'::text) "Fred said \"Hi.\""
Read more >Postgres multiple columns to json - DBA Stack Exchange
Does this build an object array instead of returning duplicate outer query results? – TheRealChx101. Dec 12, 2021 at 16:51. Add a comment ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@SamehMahmoud I @lightswitch05 I submitted a PR #37 which should be able to fix this issue.
released in 0.12.0