P
P
Pogran2016-08-30 10:45:42
JavaScript
Pogran, 2016-08-30 10:45:42

How to display an object in jsx?

I get into the variable structure oject of the form
firstName:"Ivan"
lastName:"Ivanov"
The fields of the object can be different. and now I want to pass its parameters to enumerations in the component, if with arrays it is possible to display everything through map, then what about objects?
Here's how the array works

return (
        entities.data.map(entity =>
          <Entity requestDeleteEntity={requestDeleteEntity} entity={entity} key={entity._id}  />
        )
      );

The point is that at the input I have a json like {'label 1' : 'value 1', 'label 2', 'value 2'} and so on. I need to output these data in the form of inputs and the user can also add an arbitrary number of inputs key - value.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question