I'm trying to convert my Wordpress site to be entirely front-end, REST API driven. I'm getting rid of all of my php and pretty much using Wordpress as a CMS with no php requests. I have a lot of code that Wordpress was parsing for me, but I'll need to handle myself now.
I need to be able to split this into its parts: [my_social artist = "blink-182" facebook = "https://en-gb.facebook.com/blink182/" soundcloud = "https://soundcloud.com/blink-182" spotify = "https://open.spotify.com/artist/6FBDaR13swtiWwGhX1WQsP"]
I'd eventually like the output to be something like:
{
tag: "my_social",
artist: "blink-182",
facebook: "https://en-gb.facebook.com/blink182/",
soundcloud: "https://soundcloud.com/blink-182",
spotify: "https://open.spotify.com/artist/6FBDaR13swtiWwGhX1WQsP"
}
I tried my hands at a regex, but wasn't too sure how to repeat any non-specific key-value groups. Any help?