I’ll try this out and yes, I based my code on that very helpful thread of yours. I’ve read on Sololearn and Coursera , but reading your code was the easiest way for me to understand FOREACH function.
I used your guide on the iterating lists. Here’s what I want to accomplish:
Get the folder names and adding the prefix of the “x_path” to it. “/Public/Repo” so that I can use that to go to the next folder.
I also need to add the new files to the constant list of files that i have created. My problem is, I can’t use JSON for parsing since that would include the folder names. I tried doing it with Regex with the following, but I’m getting an error.
Pattern: (false\".*name\\:\")(.*)(\")
Output: [2]
I know you have the answer to this, boss. Please guide me. I need your help.
Since that is json, it might be easier to just use json then xpath
$.folder.data[1].x_name = .htaccess
$. = start the query
folder = next available key
data[1] = next available key w/ 0,1 for which block to get
x_name = .htaccess
If you have a random amount of blocks you can always throw it in a loop and use a if then statement
i.e.
loop 0 - xxx
if folder.data.is_folder false then
copy x_name