Hello guys! I try to accomplish the following. I have a string which is a query string like:
let query = "?course_subject=Robotica&course_type=%20C&course_location=%20VIV7&course_teacher=%20Pozna_C_R&course_start_hour=14:00%20&course_end_hour=%2015:50"
Which I get with:window.location.search
What I try to get back is all the pairs name - value in an array like:
output_array = [["course_subject","Robotia"],["course_type","C"]]
And so on. But I can not figure out how to write the code using regex. Can someone help me with the code? I mention that I do not know the query string which it will come, so I can not search using a name,like:course_subject or course_type