javascripthtmljsonuser-interfaceuser-generated-content

Menu Options with User-Generated Content


I'd like to create a menu with options that users input. User inputs will most likely be stored in a JSON object.

One way to go about it would be jstree. But are there any good alternatives out there?


Solution

  • It largely depends on what you are doing with it and how you are dealing with it, but basic javascript objects is plenty to implement this.

        menu = {}
        menu["apple"] = 1.99
        menu["bagle"] = {price: 3.50, by:"KawaiUser99"}
        console.log(Object.keys(menu))
        document.write(JSON.stringify(menu))