Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

render object id in an array reactjs from database

render() {
    const data =[{"name":"test1"},{"name":"test2"}];
    return (
      <div>
      {data.map(function(d, idx){
         return (<li key={idx}>{d.name}</li>)
       })}
      </div>
    );
  }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #render #object #id #array #reactjs #database
ADD COMMENT
Topic
Name
8+8 =