$.each(data, function(index,el) { in v4 returns Uncaught ReferenceError


#1

I found several answers but nothing work with v4 version.

I make an ajax function that get data from server. This data is JSON formatted in multidimensionnal arrays.
I need to do a $.each(data, function(index,el) {

With $ or $$, I get this error :

Uncaught ReferenceError: $ is not defined

or

Uncaught ReferenceError: $$ is not defined

I tried Framework7, but this won’t work. How to do a each on an object with F7 v4 ?


#2

There is no $.each in Dom7 and you don’t need it https://stackoverflow.com/a/40737306/1923913


#4

Awesome ! That’s exactly what I was looking for. Thank you so much !

Object.keys(data).forEach(function(key) {
    var val = data[key];
    console.log(key, val)
});