JSONObject.GetField C# (CSharp) Method

GetField() public method

public GetField ( string name ) : JSONObject,
name string
return JSONObject,
	public JSONObject GetField(string name)
	{
		if (type == Type.OBJECT)
			for (int i = 0; i < keys.Count; i++)
				if (keys[i] == name)
					return list[i];
		return null;
	}
	public bool HasFields(string[] names)

Same methods

JSONObject::GetField ( bool &field, string name, FieldNotFound fail = null ) : void
JSONObject::GetField ( double &field, string name, FieldNotFound fail = null ) : void
JSONObject::GetField ( float &field, string name, FieldNotFound fail = null ) : void
JSONObject::GetField ( int &field, string name, FieldNotFound fail = null ) : void
JSONObject::GetField ( string name, GetFieldResponse response, FieldNotFound fail = null ) : void
JSONObject::GetField ( string &field, string name, FieldNotFound fail = null ) : void
JSONObject::GetField ( uint &field, string name, FieldNotFound fail = null ) : void

Usage Example

 public MovementDown(JSONObject js) : base()
 {
     _id = (int)js.GetField(js.keys[0]).n;
     _movement = (int)js.GetField(js.keys[1]).n;
     NbTurn = (int)js.GetField("nbTurn").n;
     ApplyReverseEffect = true;
 }
All Usage Examples Of JSONObject::GetField