Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

JASON in javascript

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Json Tutorial</title>
</head>
<body>
    <div class="container">This is my container</div>
    <script>
        let jsonObj = {
            name: "Harry",
            channel: "CWH",
            friend: "Rohan Das",
            food: "Bhindi" //#bhindiLoverSquad
        } 
        console.log(jsonObj);
        let myJsonStr = JSON.stringify(jsonObj);
        console.log(myJsonStr);

        myJsonStr = myJsonStr.replace('Harry', 'Larry');
        console.log(myJsonStr)

        newJsonObj = JSON.parse(myJsonStr);
        console.log(newJsonObj)

        


    </script>
</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Javascript :: html canvas not clearing 
Javascript :: convert string to camelcase 
Javascript :: useScroll 
Javascript :: sliding window algorithm javascript 
Javascript :: how can we open page on new tab in angular or js or typescript 
Javascript :: lifecycles if reactjs 
Javascript :: js remove all except numbers 
Javascript :: try and catch express 
Javascript :: Substring in Javascript using substring 
Javascript :: serializeobject jquery 
Javascript :: validate email or phone js 
Javascript :: react-native-google-places-autocomplete only cities 
Javascript :: javascript template literals html 
Javascript :: how to find last occurrence comma in a string and replace with value in javascript 
Javascript :: C# Convert DataTable to Json File using Newtonsoft.Json DLL 
Javascript :: javascript hello world 
Javascript :: anchor click event angular refresh page 
Javascript :: find the last occurrence of a character in a string javascript 
Javascript :: tolocale string no seconds 
Javascript :: mongodb bulk update 
Javascript :: context hook 
Javascript :: extract string from string javascript based on word 
Javascript :: js get each pair of values from an array of objects 
Javascript :: read files in node js 
Javascript :: getting te value of select multiple value 
Javascript :: make an object javascript 
Javascript :: Remove duplicate items in an array 
Javascript :: card react native 
Javascript :: remove array item with index 
Javascript :: react router v6 lazy suspense 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =