{"id":1084,"date":"2010-06-14T20:14:42","date_gmt":"2010-06-14T14:44:42","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=1084"},"modified":"2016-12-19T15:04:56","modified_gmt":"2016-12-19T09:34:56","slug":"getting-params-attribute-as-list","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/getting-params-attribute-as-list\/","title":{"rendered":"Getting params attribute as list()"},"content":{"rendered":"<p>following are two methods for getting parameters from GSP in form of list only:-<\/p>\n<p>even if the variable has only one value, it will be recieved as a list and not as &#8220;String&#8221;.<\/p>\n<p>List&lt;String&gt; myList = params.list(&#8216;variableName&#8217;)<br \/>\nList&lt;String&gt; myList = [params.variableName].flatten()<\/p>\n<p>~~Niraj Kumar~~<br \/>\nniraj@intelligrape.com<\/p>\n<p>http:\/\/www.tothenew.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>following are two methods for getting parameters from GSP in form of list only:- even if the variable has only one value, it will be recieved as a list and not as &#8220;String&#8221;. List&lt;String&gt; myList = params.list(&#8216;variableName&#8217;) List&lt;String&gt; myList = [params.variableName].flatten() ~~Niraj Kumar~~ niraj@intelligrape.com http:\/\/www.tothenew.com<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":4},"categories":[7],"tags":[276,277,275],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/1084"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=1084"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/1084\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=1084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=1084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=1084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}