S
S
Senseich2018-02-27 22:44:16
JavaScript
Senseich, 2018-02-27 22:44:16

How to correctly display the property of an object that is in an array?

There is such an array of objects, for example, I need to get update_id .
I write like this result[0][0]
I know what is wrong, how will it be right?

result: [
  {
    update_id: 969654782,
    message: {
      message_id: 30,
      from: {
        id: 394354774,
        is_bot: false,
        first_name: "name",
        last_name: "last_name",
        language_code: "ru",
      },
      chat: {
        id: 394354774,
        first_name: "name",
        last_name: "last_name",
        type: "private",
      },
      date: 1519757969,
      text: "2",
    },
  },
  {1},
  {2},
  {3},
]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
artem78, 2018-02-27
@Senseich

result[0]['update_id']

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question