json empty array of objects
JSON data has the concept of null and empty arrays and objects. This section explains how each of these concepts is mapped to the data object concepts of null and unset. JSONELEMENTT is the supertype for the JSONOBJECTT, JSONSCALART, and JSONARRAYT object types.You can create an empty JSONOBJECTT instance using the following constructor. Empty arrays are declared with open and closed brackets. Attemping to access values of an empty array will always return "undefined".Arrays of objects are convenient for storing lists of things that contain multiple values each. This is a commmon JSON structure and is often used when retreiving Each object contains another array of objects: messages. So far I have this codeWhen newDiscussion object is created in Firebase, I cant see messages array being created at all (maybe because its empty?). JSON object is a single item whereas JSON array (it could be collection of values as well) is a collection of objects. For Example.