@Rabbi5533
Quotes are not needed in the resource. I also recommend using the “Parse CSV string” action from the “String” module.
Screenshot_1.jpg
Screenshot_2.jpg
[[TMP]] = JSON.parse([[SUBSTRING]])
Has the string been processed internally? My small string can succeed, but the larger one fails!! It may contain characters and was processed by BAS ????
@jarrettheadrick your JSON is not valid
https://jsonlint.com/
I confirm that there is nothing wrong with my JSON... and the problem is that it works very well in debug mode but not in run mode
@jarrettheadrick said in js run JSON.parse failed ...It may contain characters and was processed by BAS ????:
@UserTrue I confirm that there is nothing wrong with my JSON... and the problem is that it works very well in debug mode but not in run mode
Do you know why???
No. Attach your json and a test project that can demonstrate this
@UserTrue this function Have Bug:
Get substring between
it in debug model ..can work
but ..in...my module ...
other project ..Reference have err now i donot how todo it ....................
Error occurred : ReferenceError: Can't find variable: _get_substring_between during execution of action
@jarrettheadrick No, I found out that I don’t have permission? My Module I found out
Write File is not without effect..?????
I have confirmed that this function has a BUG "Get substring between"
string Module for working with strings.
i found it can be not work .....string Module
@jarrettheadrick If you think that you have found a bug, then you must provide a demo script, otherwise the developers will not help you
@UserTrue hello this is code
BasStringModuleBugDemo.rar
Please install the module first
debug module
[792183716] [06:56:00] Thread #1 : OrnoBug?
[111323450] [06:56:00] Thread #1 : In Module IS OK
[205505617] [06:56:00] Thread #1 : Bug It run In run model...is failed
run module
[792183716] [06:56:36] Thread #1 : Thread ended with message "ReferenceError: Can't find variable: _get_substring_between during execution of action 792183716"
[06:56:36] Script finished correctly
@jarrettheadrick I didn't understand, did you create a module and it uses another module?
@jarrettheadrick I see that you are using an action from the "String" module in your module, the bass does not know how to work with dependencies. You need to use any action from this module somewhere at the beginning of the script for the BAS to install it.
@UserTrue ths..your demo is ok
but..in my module
still...err..
[07:42:39] Thread #1 : Thread ended with message "ReferenceError: Can't find variable: _get_substring_between during execution of action "
so..I will abandon this module and use regular expressions instead
@jarrettheadrick
how Reference a module.....
123732255] [08:12:39] Thread #1 : Thread ended with message "ReferenceError: Can't find variable: _get_substring during execution of action "