Linked Questions

9 votes
1 answer
11k views

I have a string that contains an array with numbers in square bracket like this [1, 2,3, 4]. I want convert that string into array of integers. I can use split function but I also need to strip of ...
Jazz's user avatar
  • 157
0 votes
3 answers
435 views

In my markup i got this code <div class="slider-rammi" data-slider-width="800" data-slider-nav="true" data-slider-smart-speed="1000" data-slider-nav-Class="['forrige', 'næste']"> the ...
0 votes
2 answers
282 views

let str="{SPOT:0,0:10,1:0},{SPOT:1,0:5,1:5}"; let result=[{"SPOT":0,"0":10,"1":0},{"SPOT":1,"0":5,"1":5}]; How to convert string to array of object
Manikandan's user avatar
8 votes
6 answers
23k views

I have this on a javascript var: (it's a http returned data, and I don't know if it's an array or string - (how can we see that?) - Update: using typeof returned "string", so it's a string. [{"...
MEM's user avatar
  • 31.6k
0 votes
1 answer
1k views

So I have a bunch of values I need to convert to new values. Basically with a legend. It'll make sense in a second. So far, I've been using associative arrays, or in the context of javascript, ...
David Hobs's user avatar
  • 4,531
0 votes
3 answers
312 views

Here's the string. {lat: -37.819616, lng: 144.968119}, {lat: -38.330766, lng: 144.695692}, {lat: -39.927193, lng: 175.053218}, {lat: -41.330162, lng: 174.865694}, {lat: -42.734358, lng: 147.439506}, {...
-2 votes
1 answer
112 views

I am having the below array const a1 = [1,2,3]; and want to convert it into const b1 = [{id:1},{id:2},{id:3}]; Is there a quick way in doing in javascript
maxspan's user avatar
  • 14.3k
1 vote
1 answer
219 views

When I add: var data = google.visualization.arrayToDataTable ([ ['Hora', 'Mínima',{type: 'string', role: 'style'},{type: 'string', role: 'annotation'}, 'Média',{type: 'string', role: '...
0 votes
1 answer
145 views

is there possible to convert this string to array or object? It is not a valid stringify JSON data, not sure how to tackle this. "{"subject":"Test Comment"},{"message":"Test Message."}" Thank in ...
Theren's user avatar
  • 393
0 votes
2 answers
80 views

I have a flask route where I am trying to pipe a list_object [{}] into a template. It works but the data comes out as a string on the front end. How can I convert the string back into a array_object ...
0 votes
1 answer
63 views

I am contracting an array to use it in react-native-searchable-dropdown'. I am trying to push my object into an array using the below code. i am facing issue. Please refer below. let clone=[]; obj={{...