how to create array of objects in react native?
Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To create an array of objects in react native, just use the [] brackets and curly brace with key value pair for the object. Like the following example, we can create a sample array of objects like the below example using brackets and curly brace. let arrOfObj = [ {id: 1, name: "Infinitbility"}, {id: 2, name: "aGuideHub"}, {id: 3, name: "SortoutCode"}, ]; console.log(arrOfObj); // Output // [ // 0: {id: 1, name: 'Infinitbility'}, // 1: {id: 2, name: 'aGuideHub'}, // 2: {id: 3, name: 'SortoutCode'} // ] Today, I鈥檓 going to show you How do i create an array of objects in react native, as above mentioned here, I鈥檓 going to use the brackets and curly brace to create an array of objects and for adding new objects into the array going to use push() method....