how to get property names from object using map method react

Solutions on MaxInterview for how to get property names from object using map method react by the best coders in the world

showing results for - "how to get property names from object using map method react"
Santino
19 Nov 2018
1const arrayvals = [
2   { Number: 1, newNumber: "1", name: "FB" },
3    { Number: 3, newNumber: "2", name: "FB" },
4     { Number: 7, newNumber: "5", name: "GK" },
5      { Number: 8, newNumber: "4", name: "FW" }
6]
7
8
9
10function App() {
11  return (
12    <div className="App">
13      <h1>Mapping object keys in react and returning child properties
14</h1>
15    {Object.entries(arrayvals).map((arr)=>{
16
17        return <div>Number is : {arr[1].Number}  || NewNumber is : {arr[1].newNumber} ||  and Value is : {arr[1].name}</div>
18    })}
19    </div>
20  );
21}
22