Skip to content

Instantly share code, notes, and snippets.

@nsanden
Created October 4, 2016 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nsanden/f7057c7dcbbbca45c1897041f9b79fc2 to your computer and use it in GitHub Desktop.
Save nsanden/f7057c7dcbbbca45c1897041f9b79fc2 to your computer and use it in GitHub Desktop.
self.num_reserved = order_data.match(/\"str1\"\:.*\n/)[0].match(/\d+/)[0]
change to
self.num_reserved = order_data.match(/\"str1\"\:.*\n/)[0].match(/\d+/)[0]
if(!self.num_reserved)
self.num_reserved = order_data.match(/\"str2\"\:.*\n/)[0].match(/\d+/)[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment