Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

rendering an array inside an array in react

 list.map((item, index) => {
            return (
              <div key={index}>
                <ul >{item.value}</ul>
               {
                item.list.map((subitem, i) => {
                  return (
                     <ul ><li>{subitem.value}</li></ul>
                  )
                })
               }
              </div>
            )
          }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rendering #array #array #react
ADD COMMENT
Topic
Name
9+9 =