Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const asu = [
- {
- casdi129389124: {
- Products: {
- AlienBoy040: {
- name: "Alienboy040",
- price: 12341412,
- },
- Garlek123: {
- name: "asdadasdsad",
- price: 12341412,
- },
- },
- last_login: "9901823913",
- },
- },
- {
- asu012389123: {
- Products: {
- AlienBoy111: {
- name: "Alienboy0123",
- price: 12333333,
- },
- },
- last_login: "99018123333",
- },
- },
- ];
- const tampung = [];
- asu.forEach((e) => {
- let item = e[Object.keys(e)].Products;
- for (const [key, value] of Object.entries(item)) {
- tampung.push({ name: value.name, price: value.price });
- }
- });
- console.log(tampung);
Add Comment
Please, Sign In to add comment