$.each in framework7 V2.0

How to use $.each in framework7 V2.0 ?
Thanks in advance.

thanks, I just found it by my self. :grin::grin:
$.each in v2.0 is something like this :

data.forEach(function(v,i){
});

or

data.each(function(v,i){
});
1 Like

Right, it was removed from Dom7 in favor of native JS alternatives

1 Like

I’m a lil bit confused about the v2.0, because It’s pretty different with the old one. Maybe I just need time to understand it. Awesome Framework! Good Job @nolimits4web !! :muscle::muscle:

Keep $.each for compatible with version 1.x?

How to loop array on post url. i have tried as below but am getting each is not a function.

app.request.post(‘http://localhost/sample/fetch_post’, { uid:‘12345’, timestamp: 0 }, function (response) {
console.log(‘Load was performed’);
response.each(function (key, val) {
app.dialog.alert(‘Hello world!’);
app.dialog.alert(key);
});
});

Not working .
data.each(function(v,i){
});
below error will be occur

Uncaught TypeError: response.responseText.each is not a function

Look at my previous reply, use native forEach

I can try this one working fine
(response.responseText).forEach(function (item, index) {
});

Thanks you