Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

iterate object in react

code to convert key obj to use map

<div className="iterate-object">
{
	<ul>
  		{Object.keys(OBJECTHERE).map(function(keyName, keyIndex) {
    		return (
      			<li key={keyName}>
					{keyName}
                    {console.log(OBJECTHERE[keyName])}
          		</li>
    		)
		})}
	</ul>
}
</div>
 
PREVIOUS NEXT
Tagged: #iterate #object #react
ADD COMMENT
Topic
Name
1+9 =