I have JSON data in the following format:
{"User":"aa2","Owner":"aa2_role","Status":"locked","Port":"5432","Description":"Transferred from CFS01 on Jun29","Project":"aa2","Server":"localhost"}
I can count on the key called "Project": to always be the same.
What I need is to pull the Value of the "Project": key which in this case is "aa2" using regex in JavaScript.
I have been trying different variations of /^("Project":)$/g but it is not working.
My last attempt I tried /[^"Project":$]/g but it gives me everything in the JSON Object but "Project":
Does anyone know how I can capture the value of a specific Project key?
EDIT: Just for clarification I agree with the use of the Parsing mechanism. My problem is that I am debugging/working with a previous code base that is using a separate function to pass the parsed JSON as a string into the function where now I need to pull the data needed from the string. After having spent this amount of time trying to come up with a work around I am about to scrap the function in order to use Parse... that's why I'm trying to use regex but the more I think about it, the more I realize that it's just bad code... but still, now I am just curious.