I'm very new to React Native and really need some help!
I have some JSON data which I have loaded into my React Native Application in the format below:
Object {
"company": "Company1",
"lineItem": "Line1",
"value": -1,
"year": 2017,
},
Object {
"company": "Company1",
"lineItem": "Line2",
"value": 55.5,
"year": 2016,
},
Object {
"company": "Company1",
"lineItem": "Line3",...
I need to find a way to output that data in a table with the following structure in my React Native App:
The years in the data, as well as the row labels repeat, but will always be a distinct row label and year combination.
Any pointers or help would be hugely appreciated!
You can look into this popular library which allows you to create all kinds of tables you just need to transform your data a bit and pass it to the component and it will create the table just like you are looking for.
the library is quite flexible and many customization options are available you can explore more.