1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
geniusboy [140]
4 years ago
13

Assign jsonData with the parsed value of the stringData variable. Then, assign 29 to the points property in jsonData and assign

stringData with the stringified version of jsonData.
var stringData = '{ "name": "Michael Jordan", "height": { "ft": 6, "in": 6 }, "points": 25, "position": "Power forward" }';
Computers and Technology
1 answer:
Radda [10]4 years ago
6 0

Answer:

The solution is written in JavaScript:

  1. var stringData = '{ "name": "Michael Jordan", "height": { "ft": 6, "in": 6 }, "points": 25, "position": "Power forward" }';
  2. var jsonData = JSON.parse(stringData);
  3. jsonData.points = 29;
  4. stringData = JSON.stringify(jsonData);

Explanation:

Given the string data as in Line 1, we use the JSON parse method to convert the string data into JavaScript object (Line 2) and assign the parsed data to variable jsonData.

Next, use the dot syntax to access the points property of the jsonData and set the value of 29 to it (Line 3).

At the end, use JSON stringify method to stringify the jsonData and assign the output to stringData (Line 4).  

You might be interested in
Define a method named roleOf that takes the name of an actor as an argument and returns that actor's role. If the actor is not i
gayaneshka [121]

Answer:

var movie = {

   name: "Avengers Endgame",

   director: "Joe Russo",

   composer: "Alan Silvestri",

   cast: {

       "Scarlett Johansson": "Black Widow",

       "Chris Evans": "Captain America"      

   },

   roleOf: function (name) {

       if (typeof (this.cast[name]) !== 'undefined') {

           return this.cast[name];

       } else {

           return "The actor is not part of this movie";

       }

   }

};

     

Explanation:

  • Initialize the movie JSON (JavaScript Object Notation) having the name, director, composer and cast properties.
  • Define a roleOf: function that has a name parameter.
  • Check whether the selected is not equal to undefined and then return that name.
  • Otherwise display this message: "The actor is not part of this movie".
5 0
3 years ago
OoooA,SDHVAcgacxgjcaNASAW dysdyxsgcdsgjsdgc
Arturiano [62]
Dudeeeeeeee lolzzzz :)
4 0
3 years ago
Read 2 more answers
What type of computer system can be found in the computer lab at school?
Hatshy [7]

Answer:

B: micro

Explanations

a small computer that contains a microprocessor as its central processor.

7 0
3 years ago
Write a recursive, int -valued function, len, that accepts a string and returns the number of characters in the string .
vodka [1.7K]
Without knowing the language, it's pretty imposible to write it.  Once you start thinking recursively, it's not a difficult problem.

While you're recursing, pass the string without the first character.
The base case would be a null string which would return 0.
The unwind would just add one and return that.
7 0
3 years ago
Which of the following commands appears in the INSERT menu or tab?
loris [4]

Answer:

Table

Explanation:

3 0
3 years ago
Other questions:
  • A School is interested in computerizing their students<br />grading system.<br />I Marks Grade<br />150-100 A&
    11·1 answer
  • The code that follows saves the data that was in the $names array as
    13·1 answer
  • Chunking is a good strategy for completing large assignments because it makes the work
    15·1 answer
  • Hi weegy, what is the latest android os?
    9·1 answer
  • How can you ensure that your web pages are compliant with a w3c standard?
    9·1 answer
  • What is the name of the device that senses the current flowing, tripping the circuit, and cutting off the electricity?
    13·1 answer
  • What are the characteristics of good blogs?
    8·1 answer
  • Give a non-network example of hierarchical addressing and discuss how it reduces the amount of work needed in physical delivery.
    10·1 answer
  • Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in
    13·1 answer
  • Anyone tell my answer.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!