array map js react native code example
Example 1: how to map objects in react native
const api = { 'foo': 'bar', 'foz': 'baz'};
...
render() {
return (
Object.entries(api).map(([key, value]) => {
return <View key={key}>{value}</View>
});
)
}
Example 2: react native map array of objects
var tmp_array = [
{ headline: "Test", text: "Test text", send_at: "test date" }
];