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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:54:11+00:00 2026-05-24T01:54:11+00:00

I am currently developing a JavaScript add-on which receives JSON from an API. So

  • 0

I am currently developing a JavaScript add-on which receives JSON from an API. So far, so good I retrieve the JSON and then use eval() to convert this JSON to a JavaScript object. This is where the problems start.

My JSON contains a ‘#text’-property. I evaluated the JavaScript object and found it also has this ‘#text’-property, but I can not call the property since variables with hash-tags are not accepted.

I know two possible solutions (use eval() to convert to an Array or remove the hast-tag), but I would prefer calling the property. Any ideas? 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-24T01:54:12+00:00Added an answer on May 24, 2026 at 1:54 am

    Don’t use eval, especially for this. You a json parser, modern browsers already have them.

    var myObj = JSON.parse(returnFromServer);
    console.log(myObj.firstProperty); // etc
    

    Here’s a CDN link for json2 http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js

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

Sidebar

Related Questions

I am currently developing a JavaScript (Sencha) app on my Mac which interfaces with
I am currently developing a jquery function which I intend to use to replace
I am currently developing a site and have a need for a javascript-based carousel/slider
I am trying to add the CKEditor to a page I am currently developing
I am currently developing Unit Tests for a Javascript method that detects the readiness
I'm currently developing a small, JavaScript based drawing application on iPad. I've simply wrapped
I'm currently developing (another) Open Source CMS in PHP and I'd like to use
I am currently developing a Web-Application using Java EE where I'm using a Rich-Javascript-Editor
I am currently developing an application in Adobe Flex and i have to use
I'm currently developing a php daemon for connecting and retreiving data from social networks

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.