Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Screen name:
alessandro1
alessandro1's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Ideas
Problems
Expanded view
List view
Private Message
Concatenate variables with Json keys.
[3Replies]
21-Jun-2021 01:44 PM
Forum:
Getting Started
Hi everyone,
I would like to ask for some help if you can.
I hope I'm explaining myself well. :-)
I have a json file with some data inside.
I load it via ajax.
I retrieve the key via this path.
concatenate = JsonData.change_this.title
console.log(concatenate)
It works and returns the title to me.
Now what I'd like to do is change "change_this" to something dynamic.
What I tried is the following:
new_change_this = "change_this_2";
concatenate = JsonData.new_change_this.title
console.log(concatenate)
It gives me an error because I guess I am not able to concatenate this data correctly.
Is probably not an object but a string?
But I don't understand.
Can anyone give me a way forward?
Thank you all very much.
Have a great day.
«Prev
Next »
Moderate user : alessandro1
Forum