Since JSON is just a data format, there is no way to know which of your data members will be null unless you explicitly check them. You can always reorganize your code to make it more compact and easier to read, but you will need to check each element explicitly if you do not know in advance which will be null and which will contain data.
While I don't know what your code should do, here is an example of how you can reorganize it to make it more compact:
var data = { Name: "John Doe", Age: 25, Address: null, CityState: "Denver, CO" }; for (member in data) { if (data[member] != null)
Kevin babcock
source share