I have two properties "orderby" and "orderdirection" in widget.
In runtime I can adjust those properties check snip :
I want to set these properties in my rest api query. eg: Query = "/_api/web/lists/getbytitle('" + listname + "')/items?&"$select=ID,Title,Date&$orderby=Title desc,Date asc"
Above values are hardcoded but I want to change those values in runtime. When I want to update just one value "Title desc", its easy but I want to set any number of columns at runtime.My approach : Spilt the string first orderby.Split(",") and then make one string with both combination of "orderby orderdirection,orderby orderdirection,orderby orderdirection". I just wanted to check if any other approach I can try here. Please suggest your suggestion here. Thank you .