Q:

React native give object a name in array

My array looks like this:
Array [
  Object {
    "color": "Brown",
    "time": "18:32",
  },
  Object {
    "color": "Red",
    "time": "18:33",
  },
]

But how can I change Object to a name?
I push it like this
const itemLogs = [];

childSnapshot.forEach((csh) => {
let childKeys = csh.key;
itemLogs.push({
    color:   csh.val().color,
    time:   csh.val().time
});
});
this.setState({childData: itemLogs});

UPDATE:
This is how I would like to have it:
10-05-2019 [
  14:27 {
    "color": "Brown",
    "time": "14:27",
  },
  14:23 {
    "color": "Red",
    "time": "14:23",
  },
],
11-06-2019 [
like above but other data
]

I hope this is an better Example.

A:

The debugger visualizes your data like this: 
Array [
  Object {
    "color": "Brown",
    "time": "18:32",
  },
  Object {
    "color": "Red",
    "time": "18:33",
  },
]

But it actually looks like this: 
[
  {
    "color": "Brown",
    "time": "18:32",
  },
  {
    "color": "Red",
    "time": "18:33",
  },
]

You can add a name property to your objects with: 
itemLogs.push({
    color:   csh.val().color,
    time:   csh.val().timem,
    name: 'YOUR_NAME_GOES_HERE'
});

Then your data would look like this: 
[
  {
    "color": "Brown",
    "time": "18:32",
    "name": "YOUR_FIRST_NAME",
  },
  {
    "color": "Red",
    "time": "18:33",
    "name": "YOUR_SECOND_NAME",
  },
]

Updated solution: 

const itemLogs = {}; //create an object

var arr = []; // create a temporary array 
var tmp = {}; //create a temporary object 
 tmp["14:27"] = {
    "color": "Brown",
    "time": "14:27",
  }; 

arr.push(tmp); // add object to array 


var tmp2 = {}; //create another tmp object
 tmp2["14:23"] = {
   "color": "Red",
    "time": "14:23",
  }; 
arr.push(tmp2); // add object to array 
itemLogs["10-05-2019"] = arr; // add the array to itemLogs with new key

console.log(itemLogs);

