Skip to main content
Version: 5.11.8

HasRows

public bool HasRows();
public bool HasRows(out LitJson.JsonData jsonData, bool isFlatten);

Parameters

ValueTypeDescriptionDefault
jsonDatajsonData(Optional) If the rows key exists in returnValue, it assigns the rows value in a JsonData format to the passed argument.-
isFlattenbool(Optional) Whether the data type that exists in jsonData is removedfalse

Description

Checks whether the rows key exists in the returnValue if returnValue exists in the BackendReturnObject object returned as a result of the request made to the server.

Example

var bro = Backend.GameData.Get("tableName", new Where(), 10);

LitJson.JsonData json = null;
if(bro.HasRows()) {
json = bro.Rows();
}

if(bro.HasRows(out json)) {
// Post-process
});
}

Return casess

When the rows key exists in returnValue and isFlatten is false
return : true
jsonData: Rows

When the rows key exists in returnValue and isFlatten is true
return : true
jsonData : FlattenRows

When the rows key does not exist in returnValue
return : false
jsonData : an empty JsonData object is returned

When the returnValue does not exist
return : false
jsonData : an empty JsonData object is returned