Convert a JSON string to a JSON object.

Source: Internet
Author: User

Convert a JSON string to a JSON object.

Applicable hotel O2O menu

Var stri = [// member center {"menucode": 1, "menuname": "member center" ,}, {"menucode": 1, "name ": "Member query", "perm_id": 1, SubsMenu: [{"perm_id": 1, "menueurl": "Customer/Index", "menuename ": "Member query"}] },{ "menucode": 1, "name": "sign-In points", "perm_id": 4, SubsMenu: [{"perm_id ": 4, "menueurl": "IntegralPoints/set", "menuename": "sign-In points"}] },{ "menucode": 1, "name ": "Member Level settings", "perm_id": 5, SubsMenu: [{"perm_id": 5, "menueurl": "Level/set", "menuename ": "Member level settings"}] },{ "menucode": 1, "name": "stored value management", "perm_id": 9, SubsMenu: [{"perm_id ": 9, "menueurl": "StoredPackages/List", "menuename": "stored value management"}] },{ "menucode": 1, "name": "member club ", "perm_id": 60, SubsMenu: [{"perm_id": 60, "menueurl": "Hotel/HeikahuiIntroduce", "menuename": "member club"}]}, // order center {"menucode": 2, "menuname": "order center" ,},{ "menucode": 2, "name": "room order ", "perm_id": 10, SubsMenu: [{"perm_id": 10, "menueurl": "Order/Index", "menuename": "room Order"}]}, {"menucode": 2, "name": "catering order", "perm_id": 11, SubsMenu: [{"perm_id": 11, "menueurl ": "Order/Index", "menuename": "catering Order"}] },{ "menucode": 2, "name": "group buying Order", "perm_id": 13, subsMenu: [{"perm_id": 13, "menueurl": "OrderGrouponInfo/Index", "menuename": "group purchase order"}] },{ "menucode": 2, "name": "leisure and entertainment orders", "perm_id": 15, SubsMenu: [{"perm_id": 15, "menueurl": "Order/Index", "menuename ": "leisure and entertainment orders"}] },{ "menucode": 2, "name": "Conference banquet inquiry", "perm_id": 16, SubsMenu: [{"perm_id": 16, "menueurl": "ConferenceRoom/AskList", "menuename": "Conference banquet inquiry"}] },{ "menucode": 2, "name": "Remarks pre-selection", "perm_id": 17, SubsMenu: [{"perm_id": 17, "menueurl": "RemarkPreselection/List", "menuename ": "Remarks pre-selection"}] },{ "menucode": 2, "name": "QR code Collection", "perm_id": 61, SubsMenu: [{"perm_id": 61, "menueurl": "Receivables/Index", "menuename": "QR code Collection"}]}, // room center {"menucode": 3, "menuname ": "Room Center" ,}, {"menucode": 3, "name": "room promotion", "perm_id": 18, SubsMenu: [{"perm_id": 18, "menueurl": "Promotion/List", "menuename": "room promotions"}] },{ "menucode": 3, "name": "news and promotions ", "perm_id": 23, SubsMenu: [{"perm_id": 23, "menueurl": "NewGraphic/Index", "menuename": "room promotion"}]}, {"menucode": 3, "name": "coupon", "perm_id": 8, SubsMenu: [{"perm_id": 8, "menueurl ": "Coupon/List", "menuename": "Coupon"}] },{ "menucode": 3, "name": "Coupon sales", "perm_id": 58, subsMenu: [{"perm_id": 58, "menueurl": "CouponSale/List1", "menuename": "coupon sales"}] },{ "menucode": 3, "name": "coupon scanning", "perm_id": 58, SubsMenu: [{"perm_id": 58, "menueurl": "Code/ScanCode ", "menuename": "Scan coupon"}]}, {"menucode": 3, "name": "Point redemption record", "perm_id": 3, SubsMenu: [{"perm_id": 3, "menueurl": "Gift/Handle", "menuename": "Point redemption record"}]}, {"menucode": 3, "name": "redemption Gift maintenance", "perm_id": 2, SubsMenu: [{"perm_id": 2, "menueurl": "Gift/GiftLIst", "menuename ": "redeem gift maintenance"}]}, // {"menucode": 4, "menuname": "" ,}, {"menucode": 4, "name ": "Customer Service", "perm_id": 24, SubsMenu: [{"perm_id": 24, "menueurl": "Admin/Index", "menuename ": "Customer Service"}] },{ "menucode": 4, "name": "fan group", "perm_id": 24, SubsMenu: [{"perm_id": 24, "menueurl": "CustomGroup/Index", "menuename": "fans group"}] },{ "menucode": 4, "name": "QR code ", "perm_id": 25, SubsMenu: [{"perm_id": 25, "menueurl": "Code/Index", "menuename": "QR Code"}]}, {"menucode": 4, "name": "automatic reply", "perm_id": 27, SubsMenu: [{"perm_id": 27, "menueurl ": "KeyForHotel/Index", "menuename": "Auto Reply"}] },{ "menucode": 4, "name": "menu", "perm_id": 28, subsMenu: [{"perm_id": 28, "menueurl": "Menu/Index", "menuename": "Menu"}]}, {"menucode": 4, "name": "Message", "perm_id": 29, SubsMenu: [{"perm_id": 29, "menueurl": "Message/Index", "menuename ": "Message"}] },{ "menucode": 4, "name": "follow Settings", "perm_id": 22, SubsMenu: [{"perm_id": 22, "menueurl": "FirstConcern/Index", "menuename": "follow Settings"}]}, // advanced features {"menucode": 5, "menuname ": "Advanced functions" ,}, {"menucode": 5, "name": "game Settings", "perm_id": 30, SubsMenu: [{"perm_id": 30, "menueurl": "Games/GameNew", "menuename": "game Settings"}] },{ "menucode": 5, "name": "micro wall ", "perm_id": 31, SubsMenu: [{"perm_id": 31, "menueurl": "WeChatWall/Index", "menuename": "micro wall"}]}, {"menucode": 5, "name": "Hotel Group Buying", "perm_id": 32, SubsMenu: [{"perm_id": 32, "menueurl ": "Classification Groupon/Index", "menuename": "Hotel Group Buying"}] },{ "menucode": 5, "name": "micro invitations", "perm_id": 33, subsMenu: [{"perm_id": 33, "menueurl": "WeInvitation/Index", "menuename": "micro invitation"}] },{ "menucode": 5, "name": "survey", "perm_id": 19, SubsMenu: [{"perm_id": 19, "menueurl": "Vote/Index", "menuename ": "voting survey"}] },{ "menucode": 5, "name": "questionnaire", "perm_id": 20, SubsMenu: [{"perm_id": 20, "menueurl": "Survey/Index", "menuename": "questionnaire"}] },{ "menucode": 5, "name": "share ", "perm_id": 66, SubsMenu: [{"perm_id": 66, "menueurl": "Vote/ShareVote", "menuename": "questionnaire"}]}, // hotel center {"menucode": 6, "menuname": "Hotel center", },{ "menucode": 6, "name": "hotel information ", "perm_id": 34, SubsMenu: [{"perm_id": 34, "menueurl": "Hotel/movie message", "menuename": "Hotel Info"}]}, {"menucode": 6, "name": "Hotel Introduction", "perm_id": 62, SubsMenu: [{"perm_id": 62, "menueurl ": "Hotel/Hotel introduce", "menuename": "Hotel Introduction"}] },{ "menucode": 6, "name": "Hotel facilities", "perm_id": 41, subsMenu: [{"perm_id": 41, "menueurl": "Hotel/Hotel facilities", "menuename": "Hotel facilities"}] },{ "menucode": 6, "name": "Upload Hotel images", "perm_id": 35, SubsMenu: [{"perm_id": 35, "menueurl": "HotelImg_Add/Hotel", "menuename ": "Hotel Image Upload"}] },{ "menucode": 6, "name": "room information", "perm_id": 36, SubsMenu: [{"perm_id ": 36, "menueurl": "House/List", "menuename": "room information"}] },{ "menucode": 6, "name ": "Room price Calendar", "perm_id": 37, SubsMenu: [{"perm_id": 37, "menueurl": "RoomCalendaPrice/Index", "menuename ": "Room price Calendar"}] },{ "menucode": 6, "name": "restaurant information", "perm_id": 38, SubsMenu: [{"perm_id ": 38, "menueurl": "Restaurant/List", "menuename": "Restaurant information"}] },{ "menucode": 6, "name": "leisure and entertainment ", "perm_id": 39, SubsMenu: [{"perm_id": 39, "menueurl": "Entertainment/List", "menuename": "leisure and Entertainment"}]}, {"menucode": 6, "name": "banquet", "perm_id": 40, SubsMenu: [{"perm_id": 40, "menueurl ": "ConferenceRoom/List", "menuename": "banquet"}] },{ "menucode": 6, "name": "surrounding Guide", "perm_id": 42, subsMenu: [{"perm_id": 42, "menueurl": "region regional/List", "menuename": "surrounding Guide"}] },{ "menucode": 6, "name": "Hotel WiFi", "perm_id": 43, SubsMenu: [{"perm_id": 43, "menueurl": "WifiManager/Index", "menuename ": "Hotel WiFi"}] },{ "menucode": 6, "name": "Q & A", "perm_id": 6, SubsMenu: [{"perm_id": 6, "menueurl": "Ask/List", "menuename": "Q & A"}] },{ "menucode": 6, "name": "message board/suggestion ", "perm_id": 7, SubsMenu: [{"perm_id": 7, "menueurl": "Messages/List", "menuename": "message board/suggestion"}]}, // data analysis {"menucode": 7, "menuname": "Data Analysis", },{ "menucode": 7, "name": "Order Statistics Analysis ", "perm_id": 67, SubsMenu: [{"perm_id": 67, "menueurl": "Report/OrderSummary", "menuename": "Order Statistics Analysis"}]}, {"menucode": 7, "name": "catering order analysis", "perm_id": 65, SubsMenu: [{"perm_id": 65, "menueurl ": "Report/seller antorder", "menuename": "catering order analysis"}] },{ "menucode": 7, "name": "order payment statistics", "perm_id ": 68, SubsMenu: [{"perm_id": 68, "menueurl": "Report/OrderPaySummary", "menuename": "order payment statistics"}] },{ "menucode ": 7, "name": "Scan code Payment Statistics", "perm_id": 69, SubsMenu: [{"perm_id": 69, "menueurl": "Report/ScanCodePaySummary ", "menuename": "Scan code Payment Statistics"}] },{ "menucode": 7, "name": "cash account statistics", "perm_id": 70, SubsMenu: [{"perm_id": 70, "menueurl": "Report/CashAccountSummary", "menuename": "cash account statistics"}]}, {"menucode": 7, "name": "coupon Usage Statistics", "perm_id": 71, SubsMenu: [{"perm_id": 71, "menueurl": "Report/CouponUseSummary", "menuename ": "coupon Usage Statistics"}] },{ "menucode": 7, "name": "points Statistics", "perm_id": 72, SubsMenu: [{"perm_id ": 72, "menueurl": "Report/PointsSummary", "menuename": "points Statistics"}]}, // financial statement {"menucode": 9, "menuname ": "Financial reconciliation" ,}, {"menucode": 9, "name": "Statement query", "perm_id": 57, SubsMenu: [{"perm_id": 57, "menueurl": "PayAccountStateMent/Index", "menuename": "Statement query"}]}, // system settings {"menucode": 8, "name ": "system settings" ,}, {"menucode": 8, "name": "administrator management", "perm_id": 51, SubsMenu: [{"perm_id": 51, "menueurl": "SystemSet/UserManage", "menuename": "Administrator"}] },{ "menucode": 8, "name": "Password Change ", "perm_id": 52, SubsMenu: [{"perm_id": 52, "menueurl": "SystemSet/PassWordChange", "menuename": "Password Change"}]}, {"menucode": 8, "name": "system Notification Settings", "perm_id": 53, SubsMenu: [{"perm_id": 53, "menueurl ": "yysetting/Index", "menuename": "system Notification Settings"}] },{ "menucode": 8, "name": "order confirmation Settings", "perm_id ": 73, SubsMenu: [{"perm_id": 73, "menueurl": "OrderConfirm/Index", "menuename": "order confirmation Settings"}] },{ "menucode ": 8, "name": "common hotel Settings", "perm_id": 54, SubsMenu: [{"perm_id": 54, "menueurl": "CommonTools/Index ", "menuename": "common hotel Settings"}] },{ "menucode": 8, "name": "credit deduction", "perm_id": 54, SubsMenu: [{"perm_id": 54, "menueurl": "PointDiscount/Index", "menuename": "credit deduction"}] },{ "menucode": 8, "name": "Hotel template Settings", "perm_id": 63, SubsMenu: [{"perm_id": 63, "menueurl": "setting1_theme/Hotel", "menuename ": "Hotel template Settings"}] },{ "menucode": 8, "name": "hotel order", "perm_id": 64, SubsMenu: [{"perm_id ": 63, "menueurl": "Sort Index/Index", "menuename": "Sort hotels"}] },{ "menucode": 8, "name": "voice prompt ", "perm_id": 55, SubsMenu: [{"perm_id": 63, "menueurl": "VoiceUpLoad/Index", "menuename ": "voice prompt"}] var myE = eval (stri); $ (document ). ready (function () {Menue ('@ dealer.clding.com. utility. loginInfo. permIDs ');}); function Menue (perids) {$. each (myE, function (key, value) {$ ('. dl1 '). append ("<dt class = \" dt1 \ "style = \" cursor: pointer; \ "onclick = \" menuShow (this) \ "menucode = \" "+ myE [key]. menucode + "\"> <span> "+ myE [key]. menuname + "</span> <I class = \" i02 \ "> </I> </dt> "); // <dd class = \ "dd1 \"> <a href = "+ myE [key]. menueurl + ">" + myE [key]. menuname + "\" </a> </dd> "alert (myE [key]. menuname );});

The above is all the content of this article. I hope you will like it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.