Redirect confirmation page from returned json

I am posting my form data to a URL, that URL returns json:


I am having trouble figuring out how to write a script to redirect my “thank you” page to that FirstTimeLoginURL

I have the page working on my current site (not using unbounce), but we want to convert that page to unbounce. The basic version of the script that is currently working on existing site is:

url: "post data url", 
data: JSON.stringify(dataString), // data being inserted to form
dataType: "json",
type: "POST",
contentType: "application/json",
success: function(json) {  
  window.location.href = json.FirstTimeLoginURL;

(this is a very trimmed version of the full script, but it’s the meat and potatoes of what needs to happen basically)

How can I add something similar to my scripts on this page to redirect to my FirstTimeLoginURL value, thank you.