dimanche 19 août 2018

How to detect an array of strings and an array of objects in my data using JavaScript?

I have an array of strings

arrayOfStrings = ['test', 'test] 

And an array of objects

arrayOfObjects = [{}.{}]

I need to be able to detect if my data is an array of strings and is so stringify it and if it's an array of objects do Y.




Aucun commentaire:

Enregistrer un commentaire