D
D
Dolerum2020-01-07 14:24:09
React
Dolerum, 2020-01-07 14:24:09

Is it possible to parse and pass to the presentational component from the container - two arrays at once?

Hello.
I want to gracefully transfer two arrays that come from the server in a large json. They are, as it were, separated by commas - {//// other///, array1:[{}], array2:[{}] ///other////}
But I don’t know which methods to use and whether it is possible at all Is it normal to write such code, without crutches? Here you will not manage with usual map'om it seems.
Please provide an example implementation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2020-01-07
@Dolerum

[...credits.cast, ...credits.crew].map((person) => person.name)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question