{"id":7,"date":"2024-01-08T13:24:04","date_gmt":"2024-01-08T13:24:04","guid":{"rendered":"https:\/\/uni-soft.in\/?page_id=7"},"modified":"2024-01-08T13:24:04","modified_gmt":"2024-01-08T13:24:04","slug":"test","status":"publish","type":"page","link":"https:\/\/uni-soft.in\/?page_id=7","title":{"rendered":"test"},"content":{"rendered":"        <div class=\"wp-sjs-plugin\" id=\"surveyContainer-1\">\r\n            <div id=\"surveyElement-1\">Survey is loading&#8230;<\/div>\r\n            <div id=\"surveyResult-1\"><\/div>\r\n        <\/div>\r\n        <script>\r\n            let theme;\r\n            jQuery.ajax({\r\n                url:  \"https:\/\/uni-soft.in\/wp-admin\/admin-ajax.php?action=SurveyJS_GetSurveyJson\",\r\n                type: \"POST\",\r\n                data: { Id: 1 },\r\n                success: function (data) {\r\n                    var json = {}\r\n                    if (data.json) {\r\n                        json = JSON.parse(data.json.replace(\/\\\\\\\"\/g, \"\\\"\").replace(\/\\\\\\\\\/g, \"\\\\\").replace(\/\\\\'\/g, \"'\"));\r\n                    }\r\n                    if (data.theme) {\r\n                        theme = JSON.parse(data.theme.replace(\/\\\\\\\"\/g, \"\\\"\").replace(\/\\\\\\\\\/g, \"\\\\\").replace(\/\\\\'\/g, \"'\"));\r\n                    }\r\n                    initSurvey1(json, theme);\r\n                }\r\n            });\r\n\r\n            function initSurvey1(json, theme) {\r\n                \/\/ Survey.StylesManager.applyTheme('modern');\r\n\r\n                \/\/ var customCss = {\r\n                \/\/                     \/\/ }\r\n\r\n                const survey1 = new Survey.Model(json);\r\n                if (!!theme) {\r\n                    survey1.applyTheme(theme);\r\n                }\r\n                window.survey1 = survey1;\r\n                survey1                    .onComplete\r\n                    .add(function (result) {\r\n                        jQuery.ajax({\r\n                            url:  \"https:\/\/uni-soft.in\/wp-admin\/admin-ajax.php?action=SurveyJS_SaveResult\",\r\n                            type: \"POST\",\r\n                            data: { SurveyId: '1', Json : JSON.stringify(result.data) },\r\n                            success: function (data) {}\r\n                        });\r\n                        \/\/document\r\n                        \/\/    .querySelector(\"#surveyResult-1\")\r\n                        \/\/    .innerHTML = \"result: \" + JSON.stringify(result.data);\r\n                    });\r\n\r\n                jQuery(\"#surveyElement-1\").Survey({model: survey1\/*, css: customCss*\/});\r\n            }\r\n        <\/script>        \r\n        ","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/uni-soft.in\/index.php?rest_route=\/wp\/v2\/pages\/7"}],"collection":[{"href":"https:\/\/uni-soft.in\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/uni-soft.in\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/uni-soft.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/uni-soft.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7"}],"version-history":[{"count":1,"href":"https:\/\/uni-soft.in\/index.php?rest_route=\/wp\/v2\/pages\/7\/revisions"}],"predecessor-version":[{"id":9,"href":"https:\/\/uni-soft.in\/index.php?rest_route=\/wp\/v2\/pages\/7\/revisions\/9"}],"wp:attachment":[{"href":"https:\/\/uni-soft.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}