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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:04:54+00:00 2026-05-27T23:04:54+00:00

I am having trouble with accessing a key in a hash (I am programming

  • 0

I am having trouble with accessing a key in a hash (I am programming in Node.js if that matters).

I have a callback when return a status and a reply like this:

client.metadata(folder, options, function(status, reply){
  //console.log(reply)
  console.log(reply)
  console.log("New hash: " + reply['hash']);
});

The problem is, reply[‘hash’] returns undefined. even reply.hash is undefined. How can I access the hash key in reply?

I logged reply and it is:

{
  "hash": "e533d2c19d236d0d4f84e2a9666659e1",
  "revision": 802,
  "rev": "32203a97cb5",
  "thumb_exists": false,
  "bytes": 0,
  "modified": "Wed, 04 Jan 2012 02:39:18 +0000",
  "path": "/foo",
  "is_dir": true,
  "icon": "folder",
  "root": "dropbox",
  "contents": [],
  "size": "0 bytes"
}

but when i access hash in reply like in above example, it’s:

New hash: undefined

  • 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-27T23:04:55+00:00Added an answer on May 27, 2026 at 11:04 pm

    It could be possible that the reply is a string type, and you need to convert it from JSON with a JSON.parse(reply)…

    Check out the type of the reply with console.log(typeof reply) and see what it say

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

Sidebar

Related Questions

I'm having some trouble importing and accessing a private key with the ASPNET user.
CakePHP Newbie :) I am having trouble accessing another controller and passing that data
I am having trouble accessing the values in an array, the array looks like
I'm having trouble accessing the value of the root node of an XML variable
I am having trouble accessing the id from a hash: @categories = Category.includes(:discussions) The
I am having trouble accessing two of my variables. I have looked on the
I am having trouble accessing certain properties in an object that I receive as
I'm having trouble accessing only one XML element that has the same name as
I am having trouble accessing the data field. I receive the error: Databinding methods
I'm having trouble accessing the id , area and theme values in my ViewData.

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.