How do I store data in a json file?












0















For a class project we have to build an online store in 3 parts: html, css and js, the first 2 are done but i'm at a loss about js! We should be able to put the info of one product in a json file, and parse it in html. but tbh i'm not even sure how or where to begin with it, any suggestions are appreciated! Thanks!










share|improve this question


















  • 1





    Also, please note that StackOverflow should not be used to just ask "please do my homework" to more experienced people. You should value the hard work that you will have to put into your studies. I strongly suggest you to read stackoverflow.com/help/how-to-ask.

    – roccobarbi
    Nov 23 '18 at 14:33











  • Hi! Thanks for replying, I didn't intend for it to sound like "someone come do my homework", I just wasn't even sure how to phrase it because I really didn't understand any of it, so sorry about that! And thanks for the resources!

    – Freckles
    Nov 23 '18 at 18:25
















0















For a class project we have to build an online store in 3 parts: html, css and js, the first 2 are done but i'm at a loss about js! We should be able to put the info of one product in a json file, and parse it in html. but tbh i'm not even sure how or where to begin with it, any suggestions are appreciated! Thanks!










share|improve this question


















  • 1





    Also, please note that StackOverflow should not be used to just ask "please do my homework" to more experienced people. You should value the hard work that you will have to put into your studies. I strongly suggest you to read stackoverflow.com/help/how-to-ask.

    – roccobarbi
    Nov 23 '18 at 14:33











  • Hi! Thanks for replying, I didn't intend for it to sound like "someone come do my homework", I just wasn't even sure how to phrase it because I really didn't understand any of it, so sorry about that! And thanks for the resources!

    – Freckles
    Nov 23 '18 at 18:25














0












0








0








For a class project we have to build an online store in 3 parts: html, css and js, the first 2 are done but i'm at a loss about js! We should be able to put the info of one product in a json file, and parse it in html. but tbh i'm not even sure how or where to begin with it, any suggestions are appreciated! Thanks!










share|improve this question














For a class project we have to build an online store in 3 parts: html, css and js, the first 2 are done but i'm at a loss about js! We should be able to put the info of one product in a json file, and parse it in html. but tbh i'm not even sure how or where to begin with it, any suggestions are appreciated! Thanks!







javascript json






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 23 '18 at 14:25









FrecklesFreckles

82




82








  • 1





    Also, please note that StackOverflow should not be used to just ask "please do my homework" to more experienced people. You should value the hard work that you will have to put into your studies. I strongly suggest you to read stackoverflow.com/help/how-to-ask.

    – roccobarbi
    Nov 23 '18 at 14:33











  • Hi! Thanks for replying, I didn't intend for it to sound like "someone come do my homework", I just wasn't even sure how to phrase it because I really didn't understand any of it, so sorry about that! And thanks for the resources!

    – Freckles
    Nov 23 '18 at 18:25














  • 1





    Also, please note that StackOverflow should not be used to just ask "please do my homework" to more experienced people. You should value the hard work that you will have to put into your studies. I strongly suggest you to read stackoverflow.com/help/how-to-ask.

    – roccobarbi
    Nov 23 '18 at 14:33











  • Hi! Thanks for replying, I didn't intend for it to sound like "someone come do my homework", I just wasn't even sure how to phrase it because I really didn't understand any of it, so sorry about that! And thanks for the resources!

    – Freckles
    Nov 23 '18 at 18:25








1




1





Also, please note that StackOverflow should not be used to just ask "please do my homework" to more experienced people. You should value the hard work that you will have to put into your studies. I strongly suggest you to read stackoverflow.com/help/how-to-ask.

– roccobarbi
Nov 23 '18 at 14:33





Also, please note that StackOverflow should not be used to just ask "please do my homework" to more experienced people. You should value the hard work that you will have to put into your studies. I strongly suggest you to read stackoverflow.com/help/how-to-ask.

– roccobarbi
Nov 23 '18 at 14:33













Hi! Thanks for replying, I didn't intend for it to sound like "someone come do my homework", I just wasn't even sure how to phrase it because I really didn't understand any of it, so sorry about that! And thanks for the resources!

– Freckles
Nov 23 '18 at 18:25





Hi! Thanks for replying, I didn't intend for it to sound like "someone come do my homework", I just wasn't even sure how to phrase it because I really didn't understand any of it, so sorry about that! And thanks for the resources!

– Freckles
Nov 23 '18 at 18:25












1 Answer
1






active

oldest

votes


















-1














First you can start by creating your JSON file that has all the information about the store that you want, then you can use JavaScript to read the data in that file. Finally you can use HTML and some binding to parse and show whatever you want. I can help you out if you post some sample code or a jsfiddle.






share|improve this answer



















  • 1





    ah ok so i use javascript to read the data in the json file but the data itself should be in the json file, that had me very confused, thank you so much!! :D

    – Freckles
    Nov 23 '18 at 19:30











  • Yes that is correct! I hope that clears things up. I know how hard it is sometimes to phrase a question when you don't really understand how some of the stuff work. Good luck! @Freckles

    – sbattou
    Nov 23 '18 at 19:37











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53448462%2fhow-do-i-store-data-in-a-json-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









-1














First you can start by creating your JSON file that has all the information about the store that you want, then you can use JavaScript to read the data in that file. Finally you can use HTML and some binding to parse and show whatever you want. I can help you out if you post some sample code or a jsfiddle.






share|improve this answer



















  • 1





    ah ok so i use javascript to read the data in the json file but the data itself should be in the json file, that had me very confused, thank you so much!! :D

    – Freckles
    Nov 23 '18 at 19:30











  • Yes that is correct! I hope that clears things up. I know how hard it is sometimes to phrase a question when you don't really understand how some of the stuff work. Good luck! @Freckles

    – sbattou
    Nov 23 '18 at 19:37
















-1














First you can start by creating your JSON file that has all the information about the store that you want, then you can use JavaScript to read the data in that file. Finally you can use HTML and some binding to parse and show whatever you want. I can help you out if you post some sample code or a jsfiddle.






share|improve this answer



















  • 1





    ah ok so i use javascript to read the data in the json file but the data itself should be in the json file, that had me very confused, thank you so much!! :D

    – Freckles
    Nov 23 '18 at 19:30











  • Yes that is correct! I hope that clears things up. I know how hard it is sometimes to phrase a question when you don't really understand how some of the stuff work. Good luck! @Freckles

    – sbattou
    Nov 23 '18 at 19:37














-1












-1








-1







First you can start by creating your JSON file that has all the information about the store that you want, then you can use JavaScript to read the data in that file. Finally you can use HTML and some binding to parse and show whatever you want. I can help you out if you post some sample code or a jsfiddle.






share|improve this answer













First you can start by creating your JSON file that has all the information about the store that you want, then you can use JavaScript to read the data in that file. Finally you can use HTML and some binding to parse and show whatever you want. I can help you out if you post some sample code or a jsfiddle.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 23 '18 at 14:33









sbattousbattou

7311




7311








  • 1





    ah ok so i use javascript to read the data in the json file but the data itself should be in the json file, that had me very confused, thank you so much!! :D

    – Freckles
    Nov 23 '18 at 19:30











  • Yes that is correct! I hope that clears things up. I know how hard it is sometimes to phrase a question when you don't really understand how some of the stuff work. Good luck! @Freckles

    – sbattou
    Nov 23 '18 at 19:37














  • 1





    ah ok so i use javascript to read the data in the json file but the data itself should be in the json file, that had me very confused, thank you so much!! :D

    – Freckles
    Nov 23 '18 at 19:30











  • Yes that is correct! I hope that clears things up. I know how hard it is sometimes to phrase a question when you don't really understand how some of the stuff work. Good luck! @Freckles

    – sbattou
    Nov 23 '18 at 19:37








1




1





ah ok so i use javascript to read the data in the json file but the data itself should be in the json file, that had me very confused, thank you so much!! :D

– Freckles
Nov 23 '18 at 19:30





ah ok so i use javascript to read the data in the json file but the data itself should be in the json file, that had me very confused, thank you so much!! :D

– Freckles
Nov 23 '18 at 19:30













Yes that is correct! I hope that clears things up. I know how hard it is sometimes to phrase a question when you don't really understand how some of the stuff work. Good luck! @Freckles

– sbattou
Nov 23 '18 at 19:37





Yes that is correct! I hope that clears things up. I know how hard it is sometimes to phrase a question when you don't really understand how some of the stuff work. Good luck! @Freckles

– sbattou
Nov 23 '18 at 19:37


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53448462%2fhow-do-i-store-data-in-a-json-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'