To be honest when working with JSON it's probably easier to use inline JS
Procedure DisplayElement(sValue.s)
Debug(sValue)
EndProcedure
Procedure UseInlineJS(sJson.s)
Protected sVal.s = ""
!let obj = JSON.parse(v_sjson);
!obj['Category AAA'].forEach(function(elem) {
! v_sval = elem['Name ...
Search found 191 matches
- Mon Dec 01, 2025 10:03 pm
- Forum: Coding Questions
- Topic: [SOLVED] How to work with JSON - can't wrap my head around nested struct/array of obj
- Replies: 7
- Views: 1581
- Sun Nov 30, 2025 9:04 pm
- Forum: Coding Questions
- Topic: [SOLVED] How to work with JSON - can't wrap my head around nested struct/array of obj
- Replies: 7
- Views: 1581
Re: How to work with JSON - can't wrap my head around nested struct/array of obj
How can I, for example, iterate over "Category AAA", not knowing how many products are in it?
I'm not in a position to test this right now but it should give you a pointer even if it's not quite right...
nCount = JSONArraySize(JSONValue)
i = 0
While i < nCount
nElement = GetJSONElement ...
I'm not in a position to test this right now but it should give you a pointer even if it's not quite right...
nCount = JSONArraySize(JSONValue)
i = 0
While i < nCount
nElement = GetJSONElement ...
- Thu Sep 05, 2024 12:43 pm
- Forum: General Discussion
- Topic: How to enable the right-click context menu?
- Replies: 1
- Views: 27151
Re: How to enable the right-click context menu?
I found the answer from RSBasic:
Code: Select all
Procedure DisableSiteContextMenu(state)
If state
! $('body').attr("oncontextmenu", "return false;");
Else
! $('body').attr("oncontextmenu", "");
EndIf
EndProcedure
- Thu Sep 05, 2024 12:17 pm
- Forum: General Discussion
- Topic: How to enable the right-click context menu?
- Replies: 1
- Views: 27151
How to enable the right-click context menu?
Getting a context-menu by right-clicking seems to be disabled in SB, how do I enable it?
- Thu Sep 05, 2024 12:15 pm
- Forum: Coding Questions
- Topic: async await ( preferably without callbacks )
- Replies: 2
- Views: 4802
Re: async await ( preferably without callbacks )
Let's say I want to run a SB app in a PB WebViewGadget that exposes custom PB functions, those would return a promise.
- Wed Sep 04, 2024 8:02 pm
- Forum: Coding Questions
- Topic: async await ( preferably without callbacks )
- Replies: 2
- Views: 4802
async await ( preferably without callbacks )
Is there a way of doing async await in SB?
- Wed Jun 05, 2024 8:55 am
- Forum: Coding Questions
- Topic: Option to constrain the size of a MobileContainer
- Replies: 1
- Views: 9261
Option to constrain the size of a MobileContainer
Let's say I've developed a web app that's primarily aimed at usage with a smartphone but I'd still like to be able to use it from desktop, I think it would be good if I could state if the screen dimensions > x, y put the MobileContainer in a sized, floating window ( so it's like I'm looking at a ...
- Wed May 15, 2024 12:10 pm
- Forum: General Discussion
- Topic: SpiderBasic 3.00 is out !
- Replies: 56
- Views: 322919
Re: SpiderBasic 2.60 beta 1 is ready to test !
It's working for me.
MX Linux X86_64
MX Linux X86_64
- Thu May 02, 2024 2:44 pm
- Forum: Coding Questions
- Topic: Client server models
- Replies: 2
- Views: 5278
Re: Client server models
But are there other "cleaner" ways than using CGI? Are there examples? Or recommendation?
CGI is the most simple.
Is it possible to use a database other than sqlite? As that would sure make client/server data exchange much simpler
Not really, you can't access the db server directly from the ...
- Thu Apr 11, 2024 11:20 am
- Forum: Tricks 'n' Tips
- Topic: Shoelace: A forward-thinking library of web components
- Replies: 2
- Views: 35214
Re: Shoelace: A forward-thinking library of web components
The developer of Shoelace has now joined the Font Awesome team and the next generation will be known as Web Awesome.