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

  • SEARCH
  • Home
  • 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 8638403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:43:11+00:00 2026-06-12T10:43:11+00:00

Using var arrayOfObjects = eval(photo.likes.data); var objects = arrayOfObjects; console.log(objects); I get the code

  • 0

Using

var arrayOfObjects = eval(photo.likes.data);

var objects = arrayOfObjects;
console.log(objects);

I get the code below is what console.log echos

json

[
Object
full_name: "marcab12"
id: "181407552"
profile_picture: "http://images.instagram.com/profiles/profile_181407550_75sq_1339521398.jpg"
username: "marcab12"
__proto__: Object
, 
Object
full_name: "Ramage1992"
id: "21574723"
profile_picture: "http://images.instagram.com/profiles/profile_21574703_75sq_1349343851.jpg"
username: "ramage_1992"
__proto__: Object
]

How can I manage to show just the usernames on two lines as the javascipt I use seems to echo the 2 objects.

EDIT

$.each(likesperimage,function(index){
                liked = likesperimage[index].username;
                console.log(photo.id+' - '+liked);
            });
  • 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-12T10:43:12+00:00Added an answer on June 12, 2026 at 10:43 am

    I am assuming that this is a json array and you want to display the username for all the users in this array.The following code should work

            $.each(arrayOfObjects,function(index)
            {
               console.log(arrayOfObjects[index].username);              
    
            });
    

    here is the link to each in jquery api
    http://api.jquery.com/jQuery.each/

    Please test this code before using it.This is just a demonstration of how it can be done and there might be better ways to do it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using: var data = $(form :input[value]); To get all the values in a
Given the code below using (var context = new PrincipalContext(ContextType.Domain, SOME_DOMAIN)) using (UserPrincipal userPrincipal
Suppose I have the following: using(var ctx = DataContextFactory.Create(0)) { ... Some code ...
I have the following code: using (var db = new IntDB()) { var subscription
Have some code: using (var ctx = new testDataContext()) { var options = new
I have this code: public byte[] SerializeToBlob() { using (var buffer = new MemoryStream())
I usually use code like this: using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings[MyConn].ConnectionString)) { var
I'm saving an uploaded image using this code: using (var fileStream = File.Create(savePath)) {
Behold the code: using (var client = new WebClient()) { using (var stream =
Behold the code: using (var client = new WebClient()) { try { var bytesReceived

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.