skip to Main Content

jsonb_strip_nulls equivalent in sql server

I'm using next request to get json from some json type column in POSTGRES: SELECT jsonb_strip_nulls(json_build_object( 'employee', c."info"->'employee2', 'product', c."info"->'product2' )::jsonb) as info FROM item."Item" AS c WHERE "rootId" = '40a8cb67-84f8-33b5-87dc-e1b039858d43' GROUP BY "id") ...; jsonb_strip_nulls omits unnecessary fields with…

VIEW QUESTION

Ios swift – How can I remove Escaped string from Json?

I am trying to send request to server. unable get correct format JSON . please help to resolve this error. [ "{"ProductGroupId":"994475","ProductId":"994408"}", "{"ProductGroupId":"994475","ProductId":"999737"}", "{"ProductGroupId":"994475","ProductId":"999915"}", "{"ProductGroupId":"994475","ProductId":"1194875"}" ] self.productGroupList = json.response.result.packages[0].productGroups for index in 1..<self.productGroupList[3].products.count{ self.productGroupIdList.append(self.productGroupList[3].products[index].productGroupID) self.productGroupIdList.append(self.productGroupList[3].products[index].id) let dictionary = ["ProductGroupId": self.productGroupList[3].products[index].productGroupID,…

VIEW QUESTION

Json – How to create array using values from input array and another fields from hierarchy using JOLT

I am trying to generate the JSON output based on JSON input using JOLT. Output should contain flatten array of objects for storing in db. Each object should contain following fields: rateplan = subscriptions.subscription[].products[specification=rateplan].code code = subscriptions.subscription[].options[].products[].code mandatory = subscriptions.subscription[].options[].mandatory…

VIEW QUESTION

Array key on laravel controller group by

I want to get data plan by date, then I use carbon on laravel to get it. this my query on laravel controller $data = DB::table('visit_plan') ->join('outlets', 'outlets.id', '=', 'visit_plan.id_outlet') ->select('outlets.id', 'outlets.name') ->get() ->groupBy(function($date) { return $this->attributes['date'] = Carbon::parse($date->date)->format('Y-m-d'); });…

VIEW QUESTION
Back To Top
Search