In this code I want the value in centreValues to come from some other array
const centreValues=[
{
title:'Type',
value:centreDetail.location_type
},
{
title:'Address',
value:centreDetail.address1+centreDetail.address2
},
{
title:'City',
value:centreDetail.city
},
{
title:'State/Province',
value:centreDetail.state
},
{
title:'Postal/Zipcode',
value:centreDetail.zip
},
{
title:'Phone',
value:centreDetail.phone
},
]
my centreDetails is json like this:
centreDetails={
location_type:'some Value',
address1: 'some Value',
address2:'some Value',
....
}
I want to bring these values in centreValues array.How could I do that?
