1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Stackoverflow]

Discussão em 'StackOverflow' iniciado por fdantas, Agosto 4, 2021.

  1. fdantas

    fdantas Administrator Moderador

    I have a JsonArray of Integers example - [1000, 1001, 1002,.....,1100].

    I need to traverse this JsonArray so that I can call my function one by one.

    I tried

    function Amen returns JsonObject (input code as JsonArray, input lang as char):

    def var Amenities as JsonObject.
    Amenities = new JsonObject().
    Amenities:Add("Code", code).
    for first inditaal where string(inditaal.indi-nr) = string(code) and inditaal.taal-code = lang no-lock.
    end.
    Amenities:Add("Description", inditaal.inditaal-oms).

    return Amenities.

    end function.

    define variable code as JsonArray no-undo init [10400, 10239, 10205].

    def var result as JsonArray.
    result = new JsonArray().

    def var lineObj as JsonArray.

    do i = 1 to code :length:
    lineObj = new JsonArray().
    lineObj = code :GetJsonArray(i).
    result:Add(Amen(lineObj)).
    end.


    I am unable to get integers from JsonArray code. Is there any other way to do it?

    As I am new to this language, I am unable to do so and also I'm not finding anything in the documentation. Please Help!

    Continue reading...

Compartilhe esta Página