I\'m building a react native application which suppose to use some \'meta-data\' objects as sources. I\'m parsing each object in array and returning a JSX layout for each
You can do something like this
Details = [
{
type: "Party",
image: require("../../../images/icons/photographer/Party.png")
},
{
type: "Wedding",
image: require("../../../images/icons/photographer/Wedding.png")
},
{
type: "Architecture",
image: require("../../../images/icons/photographer/Arhitecture.png")
},
{
type: "Christening",
image: require("../../../images/icons/photographer/Christening.png")
}
];
render() {
let renderPhotoTypes = () => {
let type = [];
this.Details.map( ( item )=> {
type.push(
{item.type}
);
} );
return type;
};