Further Market
  • Essentials

    • Foreword
    • What is FM Script ?
    • The philosophy and benefits of FmScript
    • What you will learn
  • Recall

    • Internet: who? what? What is that?
    • Further market and FMScript
    • The compiler
  • Download
  • Getting started

    • Installation
    • Create a business account
    • Connect to the PC application
    • Create your first applet
    • Create your first web applet
    • Compiler view
  • Basics

    • basic rules
    • Reserved keywords
    • The Syntax
    • Coding Style
    • comments
    • Variables, constants, and data types
    • Convertion of types
    • Conditions and loops
  • Functions

    • Create a Menu
    • Create input field (Input2)
    • Create a QR Code
    • Scan a QR Code
    • Strings functions
    • Array functions
    • Date Time functions
    • Mathematics functions
    • JSON functions
    • XML functions
    • Call Http request
    • Manipulate Sessions
    • Financial functions
    • Notifications
    • Bleutooth Printer
  • Demos

    • Advanced Inputs
    • Call http Request
    • loops and conditions
    • Menu inputs
    • Array items count
    • Simpe for
    • simple select count Sql Query
    • Date and Time picker form
    • Get credit balance
    • is valid city
    • user info from phone number
    • get country and city from form
    • simple ussd link switch
    • charge user credit
    • simple message box
    • user entry code
    • get users relations
    • my external payements collected
    • call google Map
    • in App direct publish
    • Geo location
    • Charts
    • menu with hints
    • call system Messenger
    • user start code
    • In call Gallery
    • credit card payment Request
    • MTN CMR Airtime Product Subscription
    • MenuItemAddContacts
    • AJax and FM Input
    • Input2
    • MenuItemAddRichMedias
    • MenuItemAddTagsItems2
    • BlinBlin Menu + javascript
    • GENERAL ALERT MESSAGE WITH JSON OPTIONS
    • Barcode
  • databases

    • CRM
    • External Payments
    • Bills
    • Sales
    • Games
    • Applets
    • Payments Gateway
    • Manipulate Select Queries
  • APIs

    • Further Markey Pay button integration
    • Mobile Money cash collector
    • Bill Api
    • API PUBLISH PRODUCT
    • Sale Api
    • SMS Api
  • Advanced

    • Actions scheduler
    • Events settings
  • USSD CAMEROON

Json Functions

  • JSONArrayItem
  • JSONArrayItemCount
  • JSONItemBuild
  • JSONItemClear
  • JSONValue

JSONArrayItem

Return A Json value if success or 0,XXX if failed

Signature
                
VAR Result: String;
Result := JSONArrayItem(AJsonString : String; ItemIndex : Integer);
                
            
Demo
                
VAR Result : String;
VAR JSON   : String;
VAR Count  : Integer;

JSON := '[{"Greeting":"Hello 1 ","Name":"User 1"},{"Greeting":"Hello 2 ","Name":"User 2"}]';

Count := JSONArrayItemsCount(JSON);

ShowMessage('Count = ' + IntToStr(Count));

ShowMessage('First Element  = ' + JSONArrayItem(JSON,0));
ShowMessage('Second Element  = ' + JSONArrayItem(JSON,1));
//ShowMessage(JSONValue(JSON, 'Greeting'));
Exit;
                
            


JSONArrayItemCount

May return string with description of failure

Signature
                
VAR Result: String;
Result := JSONArrayItemCount(AJsonString : String);
                
            
Demo
                
VAR Result : String;
VAR JSON   : String;
VAR Count  : Integer;

JSON := '[{"Greeting":"Hello 1 ","Name":"User 1"},{"Greeting":"Hello 2 ","Name":"User 2"}]';

Count := JSONArrayItemsCount(JSON);

ShowMessage('Count = ' + IntToStr(Count));
Exit;
                
            


JSONItemBuild

Return Builded Json String.

Signature
                
VAR Result: String;
Result := JSONItemBuild(JSONName, JSONItemName, JSONItemValue : String)
                
            
Demo
                
VAR Result : String;

Result := JSONItemBuild('JSONName', 'Greeting' , 'Hello 1 ');
Result := JSONItemBuild('JSONName', 'Name' , 'User');


ShowMessage(Result);
Exit;
                
            

The above code will returns :

                
{"Greeting":"Hello 1 ","Name":"User"}
                
            


JSONItemClear

Return cleared Json String

Signature
                
JSONItemClear(JSONName : String);
                
            
Demo
                
VAR Result: String;
Result := JSONItemClear('JSONName');
Exit;
                
            


JSONValue

Return A string Value if found or 0,XXX if failed

Signature
                
VAR Result: String;
Result := JSONValue(AJSONText : String; AValueName : String)
                
            
Demo
                
VAR Result : String;
VAR JSON   : String;

JSON := '{"Greeting":"Hello 1 ","Name":"User"}';

ShowMessage(JSONValue(JSON, 'Greeting'));
Exit;
                
            
Mathematics functions
XML functions


Our Partners

Support
      Telephone : (+237) 675979899 / 676009100
      Email : fm_support@f-m.fm
      P.O Box : 774 BAFOUSSAM
Available On

no
no

Further Market Inc
Copyright © 2012-2021.