Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9208119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:32:52+00:00 2026-06-18T00:32:52+00:00

Possible Duplicate: Combine 2 JSON objects in JQUERY I’m creating a facebook app with

  • 0

Possible Duplicate:
Combine 2 JSON objects in JQUERY

I’m creating a facebook app with node on the backend to get the album list and show the cover photo for each. It needs to be done with two calls, one to get a list of albums, another to get the cover photo with the id of a particular album

my code looks something like this

 $('#main').on('click', '#albums', function() {
      $.get('/albums', function(data) {
           for (i = 0; i < data.data.length; i++) {
                $.get('/cover-photo?id=' + data.data[i].cover_photo, function(dataz) {
                     data+=dataz;
                });
            }
            console.log(data);
       });
  });

the reason I want it all in one object is because I’m using javascript templating and it’d be better to just have one object that has everything

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:32:53+00:00Added an answer on June 18, 2026 at 12:32 am

    If you want to combine this object for using tepmplate enging I will suggest you just add a another key with the same object so you can access all information of album and also with that each album cover photo object.

    Like:

    $('#main').on('click', '#albums', function() {
     $.get('/albums', function(data) {
       for(i = 0; i < data.data.length; i++) {
        $.get('/cover-photo?id=' + data.data[i].cover_photo, function(dataz) {
          data.data[i].coverPhotoObj = dataz;
          //this new key with perticular album object will hold that cover photo object details
        });
      }
     console.log(data);
    });});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: MySQL Results as comma separated list Combine Multiple child rows into one
Possible Duplicate: Combine two selectors with one jQuery object I have the following jquery
Possible Duplicate: How can I combine multiple rows into a comma-delimited list in Oracle?
Possible Duplicate: How can I combine multiple rows into a comma-delimited list in Oracle?
Possible Duplicate: What is the difference between Join and Union? How do we combine
Possible Duplicate: How can I convert a list<> to a multi-dimensional array? I want
Possible Duplicate: Python : how to append new elements in a list of list?
Possible Duplicate: Combine Multiple child rows into one row MYSQL I have following table,
Possible Duplicate: How to combine these two SQL statements? I have 2 SQL queries.
Possible Duplicate: Why do I get a null pointer exception from TabWidget? I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.