Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 days ago.
Improve this question
when i write ગુજરાતી but show ગુજરાતી in html why ??
let jsq_questions = [
{
"id": 1,
"question": "ગુજરાતી ",
"options": {
"a": "શ્રી વિરાટ કોહલી",
"b": "શ્રી બાબર આઝમ",
"c": "શ્રી પેટ કમિન્સ",
"d": "શ્રી બેન સ્ટોક્સ"
},
"answer": "b"
}
but show
how to get normal language
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I'm trying to get JSON in a valid format so that it can be sent to an API and I can't figure out why the below JSON is not valid. Please can someone explain why this is not valid?
{
"Description": "test",
"Quantity": "0.30",
"UnitAmount": "6400.0",
"TaxType": "OUTPUT2",
"AccountCode": "200"
},
{
"Description": "test2",
"Quantity": "0.30",
"UnitAmount": "0.0",
"TaxType": "OUTPUT2",
"AccountCode": "200"
}
The top level of a JSON text must be one of the JSON data types (like object, array, or string).
There can only be one data type at the top level.
You have an object but then you have a comma and then a second object.
Perhaps you should wrap it in an array.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Im working on a Auth flow. A private project for me and some friends
My code is getting raw from A website then its put it into a vatiable.
An example of what is inside the variable
{
"token": "mytoken",
"id": "testid"
}
I would like to get the value of token and print it
let raw = {
"token": "mytoken",
"id": "testid"
}
Then raw.token or raw["token"] should do the trick.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
As well as how to use java script to manipulate numbers from whole numbers to float and vice versa.
Thank you very much
var myArray = ["I", "need", "your", "code", "to", "help", "you"];
myArray.forEach(function(element) {
console.log(element);
});
console.log(myArray.join(" "));
If I have understood correctly your question.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I am trying to get the result of the following json object returned by google driving api.
"routes": [
{
"bounds": {
"Ga": {
"C": 39.01115,
"j": 39.06483
},
"xa": {
"j": -77.57857000000001,
"C": -77.47601
}
},
"copyrights": "Map data ©2015 Google",
"legs": [
{
"distance": {
"text": "9.4 mi",
"value": 15096
},
"duration": {
"text": "15 mins",
"value": 870
},
"end_address":"1234 Any St USA".....//and so on
how would i go about getting the data in "text" or "end_address"
i have tried
alert(result.routes.legs.distance.text)
and
alert(result.routes.legs.end_address);
and i get
Uncaught TypeError: Cannot read property 'distance' of undefined
and
Uncaught TypeError: Cannot read property 'end_address' of undefined
respectively
routes is an array and legs is an array within each of the routes array objects
Try
alert(routes[0].legs[0].distance.text)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
<script>
var myJSONObject = {"onw": [ {"name": "nitin", "age": "31", "sal": "4000"},{"name1": "nilesh", "age": "11", "sal": "14000"}]};
document.write(myJSONObject['onw']);
//document.write(myJSONObject.onw.name);
</script>
o/p:
undefined
Do you mean how to print each onw's info ?
You can use
document.write(myJSONObject['onw'][0].name);
this method to combine