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 6774091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:44:44+00:00 2026-05-26T15:44:44+00:00

If I have a JSON array that I’m reciving from the server and I

  • 0

If I have a JSON array that I’m reciving from the server and I want to use it (for example) for autocomplete — I can just make a JavaScript array, and use a loop to place the JSON values into the array and then use it for my autocomplete.

Is that way really wrong?

Thanks !

  • 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-05-26T15:44:45+00:00Added an answer on May 26, 2026 at 3:44 pm

    The response you receive from the server will be a string, which is not very useful for making a loop.

    I assume that you wish to use a split or regex to parse the JSON yourself.
    That is fine, and is actually safer than eval’ing the incoming data – and quicker than most standard regexs for the task.

    However, it loses the advantages of having the incoming data in a format understood by JS, and you are likely to miss something that might theoretically be exploited.

    In Firefox 3.1, JSON parsing is native and safe. Once that becomes standard, there would be no benefit to using your own parser. Till then, its a question of tradeoff – how much work would you need to invest for what risk and benefit.

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

Sidebar

Related Questions

i have a json array that i want to convert into a plain javascript
I have a JSON array coming in from the server with an array of
Hi I have a JSON object that is a 2-dimentional array and I need
I have a php file somejson.php that echos a json encoded array {jsonone:first json,jsontwo:second
I have a JSON array with ActiveRecord objects. These objects can be reconstructed using
Hi I want to create a JSON array. I have tried using: JSONArray jArray
I have a JSON array that looks like this: ['Monkey','Cheetah','Elephant','Lizard','Spider'] I also have a
I have a JSON response from a web service that I need to be
Okay, so I have a JSON array of image URLs. I want to load
I have a php file that reads data from my mysqldb as a json

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.