What I am trying to accomplish.
Hydrate chart data with my data from firebase
Issue
The chart I am using want's data in this format
data: [
{ value: 15 },
{ value: 10 },
{ value: 12 },
{ value: 11 },
]
I have the this.datasource that populates my listview and then I can get the values I want in the chart, just the wrong format. I don't know how to get the data without the quotes.
var chartArrayFilter = (JSON.stringify(items, ['value']));
console.log = [{"value":"5"},{"value":"9"},{"value":"0"},{"value":"4"}]
My Question
I have tried to hack that array (or string) and remove the double quotes, but I don't thing React Native lets that happen. Am I doing this completely wrong? How do I get the data I want in that format from a javascript object?
This is the package I am working with https://www.npmjs.com/package/react-native-charts
Thanks!