Restructure Objects coming from Rest-Api

Take a look at this: https://jsfiddle.net/9j96jbxn/1/

Replace your data.forEach(function (element) {...} with a nested for loop. This should get you close to what you are looking for.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)