skip to Main Content

Why can't get json as the right response?

Open the url https://hnx.vn/en-gb/cophieu-etfs/chung-khoan-ny.html with browser,then click page 2 ,you can see that the content in response is a json. I build a request with urllib to get the json: import urllib.request import ssl,json base_url = "https://hnx.vn/ModuleIssuer/List/ListSearch_Datas" proxy_handler = urllib.request.ProxyHandler({'https':…

VIEW QUESTION

get rid of numbers in json response (LARAVEL 8)

my function in a controller is here below public function getStudentsinGrade($grade, $school_id){ $students = Student::where('school_id', $school_id)->get(); $this -> grade = $grade; $gradeStudent= $students->filter(function($value,$key){ return $value->grade == $this->grade; }); if(count($gradeStudent) > 0){ return response()->json($gradeStudent); } else{ return response('No Registered Student'); }…

VIEW QUESTION
Back To Top
Search