private void HandleOnGameCreated(Packet gameInfo) { Debug.Log(gameInfo.ToString()); string selectedGameType = ddGameType.captionText.text; string selectedPokerType = ddPokerType.captionText.text; string selectedMoneyType = ddMoneyType.captionText.text; int selectedGameSpeed = ddGameSpeed.value; int selectedLimitType = ddLimitType.value; string selectedTournamentType = ddTournamentType.captionText.text; JSONArray arr = new JSONArray(gameInfo.ToString()); JSON_Object dataObj = arr.getJSONObject(1).getJSONObject("data"); JSON_Object gameObj = dataObj.getJSONObject("game"); string gameType = gameObj.getString(APIConstants.FIELD_GAME_TYPE); string pokerType = gameObj.getString(APIConstants.FIELD_POKER_TYPE); string moneyType = gameObj.getString(APIConstants.FIELD_MONEY_TYPE); string gameSpeedType = gameObj.getString(APIConstants.FIELD_GAME_SPEED); string limitType = gameObj.getString(APIConstants.FIELD_LIMIT); // string tournamentType = gameObj.getString (APIConstants.FIELD_TOUR_TYPE); if (selectedGameType.Equals(GetCreatedGameType(gameType)) && (selectedPokerType.Equals("All") || selectedPokerType.Equals(GetCreatedPokerType(pokerType))) || (selectedMoneyType.Equals("All") || selectedMoneyType.Equals(GetCreatedMoneyType(moneyType))) || (selectedGameSpeed.Equals("All") || selectedGameSpeed == GetCreatedGameSpeedType(gameSpeedType)) || (selectedLimitType.Equals("All") || selectedLimitType == GetCreatedGameLimitType(limitType))) { backgroundLoader.SetActive(true); GetFilteredData(false); } }