In my javascript:
console.log($.isArray(thisValue)); //true
strDisplay = thisValue.split(" "); //TypeError: thisValue.split is not a function
‘thisValue’ is a property of an object I’m getting from a .json file. In certain cases, my object’s properties could be an array. I look at the raw .json file, and it seems to be properly formatted as an array.
Any ideas on what could be going on here?
Thanks.
.split()is a method to be used onStrings, notArrays.Reference and examples
It appears that you want
Array.join, which glues together anArrayinto aString.