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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:06:17+00:00 2026-05-17T19:06:17+00:00

I am using the services module in drupal a long with the JSON Server,

  • 0

I am using the services module in drupal a long with the JSON Server, and I am accessing it using jQuery this works great, but I have one small problem.

Drupal/JSON Server always seem to return objects with the # symbol, which I don’t really know how to handle, this prevents me from doing

object.property

Because in reality it’s object.#property but obviously javascript gives error here, so should I just run a regex and replace the “#” symbols or what do I do?

Example, I invoke some method using a jQuery post, and it returns data such as, a console.log would spit out this:

Object
#data: Object
#error: true
#message: "Already logged in as admin."
__proto__: Object
#error: false
__proto__: Object

Now it works great it returns the data I need etc, but I want to be able todo:

object.message , but it wont let me because of the #
and I can’t do object.#message

So either javascript have some funny thing built in for this, or I need to delete all the “#” but that does not seem like such a good solution to me, don’t ask me why drupal returns objects with this symbol as part of the name, I suppose it has some kind of use or meaning but I have yet to understand that

Forgive my ignorance if it’s something “obvious” 😀

Also I suppose a regex would just make my app slower if these are big json objects/strings so rather not, right?

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-17T19:06:18+00:00Added an answer on May 17, 2026 at 7:06 pm

    You can always use object['#message'] when the property name has weird characters like that.

    I don’t know anything about Drupal but if I were in that situation I’d certainly try to figure out how to get it to quit sending weird JSON back to me like that.

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

Sidebar

Related Questions

I'm using NetBeans 6.9.1 on Mac OS X 10.6.4 with Java 1.6.0_22. I have
I'm writing an API wrapper to a couple of different web services. I have
I'm setting up a Drupal 7 website. Currently, the website is running inside a
I have the following environment: Tomcat 5.5.30 Java 6 JAX-WS RI 2.1 My main
Using pyblog.py , I got the following error, which I then tried to more
I am a noob to web services world. I need to develop a login
I'm using eclipse with WTP plugin for creating a client to call secure web
I am using PRISM 4 and got my head around almost all features, however
I am trying to create a modular Silverlight 4.0 application, where the modules are

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.